mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-05 21:53:08 -06:00
Removed some unnecessary methods.
This commit is contained in:
parent
f949d2476b
commit
32ed8a4d8d
@ -2,7 +2,6 @@
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\AccountMeta
|
||||
@ -18,14 +17,7 @@ use Watson\Validating\ValidatingTrait;
|
||||
class AccountMeta extends Model
|
||||
{
|
||||
|
||||
use ValidatingTrait;
|
||||
protected $fillable = ['account_id', 'name', 'data'];
|
||||
protected $rules
|
||||
= [
|
||||
'account_id' => 'required|exists:accounts,id',
|
||||
'name' => 'required|between:1,100',
|
||||
'data' => 'required',
|
||||
];
|
||||
protected $table = 'account_meta';
|
||||
protected $dates = ['created_at', 'updated_at'];
|
||||
|
||||
|
@ -9,7 +9,6 @@ use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Tag
|
||||
@ -31,18 +30,7 @@ use Watson\Validating\ValidatingTrait;
|
||||
*/
|
||||
class Tag extends Model
|
||||
{
|
||||
use ValidatingTrait;
|
||||
|
||||
protected $fillable = ['user_id', 'tag', 'date', 'description', 'longitude', 'latitude', 'zoomLevel', 'tagMode'];
|
||||
protected $rules
|
||||
= [
|
||||
'tag' => 'required|min:1',
|
||||
'description' => 'min:1',
|
||||
'date' => 'date',
|
||||
'latitude' => 'numeric|min:-90|max:90',
|
||||
'longitude' => 'numeric|min:-90|max:90',
|
||||
'tagMode' => 'required|in:nothing,balancingAct,advancePayment',
|
||||
];
|
||||
protected $dates = ['created_at', 'updated_at', 'date'];
|
||||
|
||||
/**
|
||||
|
@ -323,7 +323,8 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
{
|
||||
$journal = TransactionJournal
|
||||
::orderBy('transaction_journals.date', 'ASC')
|
||||
->accountIs($account)
|
||||
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->where('transactions.account_id', $account->id)
|
||||
->transactionTypes([TransactionType::OPENING_BALANCE])
|
||||
->orderBy('created_at', 'ASC')
|
||||
->first(['transaction_journals.*']);
|
||||
|
Loading…
Reference in New Issue
Block a user