mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some general cleaning up.
This commit is contained in:
@@ -7,25 +7,25 @@ use LaravelBook\Ardent\Builder;
|
||||
/**
|
||||
* Account
|
||||
*
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property integer $user_id
|
||||
* @property integer $account_type_id
|
||||
* @property string $name
|
||||
* @property boolean $active
|
||||
* @property-read \AccountType $accountType
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property integer $user_id
|
||||
* @property integer $account_type_id
|
||||
* @property string $name
|
||||
* @property boolean $active
|
||||
* @property-read \AccountType $accountType
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\Transaction[] $transactions
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\Piggybank[] $piggybanks
|
||||
* @property-read \User $user
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereUserId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereAccountTypeId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereName($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereActive($value)
|
||||
* @method static \Account accountTypeIn($types)
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\Piggybank[] $piggybanks
|
||||
* @property-read \User $user
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereUserId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereAccountTypeId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereName($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Account whereActive($value)
|
||||
* @method static \Account accountTypeIn($types)
|
||||
*/
|
||||
class Account extends Ardent
|
||||
{
|
||||
@@ -36,8 +36,11 @@ class Account extends Ardent
|
||||
* @var array
|
||||
*/
|
||||
public static $rules
|
||||
= ['name' => ['required', 'between:1,100', 'alphabasic'], 'user_id' => 'required|exists:users,id',
|
||||
'account_type_id' => 'required|exists:account_types,id', 'active' => 'required|boolean'
|
||||
= [
|
||||
'name' => ['required', 'between:1,100', 'alphabasic'],
|
||||
'user_id' => 'required|exists:users,id',
|
||||
'account_type_id' => 'required|exists:account_types,id',
|
||||
'active' => 'required|boolean'
|
||||
|
||||
];
|
||||
|
||||
@@ -56,6 +59,8 @@ class Account extends Ardent
|
||||
/**
|
||||
* Get an accounts current balance.
|
||||
*
|
||||
* TODO remove this method in favour of something in the FireflyIII libraries.
|
||||
*
|
||||
* @param \Carbon\Carbon $date
|
||||
*
|
||||
* @return float
|
||||
@@ -82,6 +87,9 @@ class Account extends Ardent
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* TODO remove this method in favour of something in the FireflyIII libraries.
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return float
|
||||
@@ -98,6 +106,8 @@ class Account extends Ardent
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO remove this method in favour of something in the FireflyIII libraries.
|
||||
*
|
||||
* @return Carbon
|
||||
*/
|
||||
public function lastActionDate()
|
||||
@@ -119,6 +129,8 @@ class Account extends Ardent
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO remove this method in favour of something in the FireflyIII libraries.
|
||||
*
|
||||
* @param \Carbon\Carbon $date
|
||||
*
|
||||
* @return null
|
||||
|
||||
Reference in New Issue
Block a user