mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
New account and transaction types
This commit is contained in:
parent
41d1ef27b5
commit
bff274d058
@ -74,6 +74,8 @@ class AccountType extends Model
|
||||
public const MORTGAGE = 'Mortgage';
|
||||
/** @var string */
|
||||
public const CREDITCARD = 'Credit card';
|
||||
/** @var string */
|
||||
public const LIABILITY_CREDIT = 'Liability credit account';
|
||||
/**
|
||||
* The attributes that should be casted to native types.
|
||||
*
|
||||
|
@ -34,13 +34,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
/**
|
||||
* FireflyIII\Models\TransactionType
|
||||
*
|
||||
* @property int $id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Carbon|null $deleted_at
|
||||
* @property string $type
|
||||
* @property int $id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Carbon|null $deleted_at
|
||||
* @property string $type
|
||||
* @property-read Collection|\FireflyIII\Models\TransactionJournal[] $transactionJournals
|
||||
* @property-read int|null $transaction_journals_count
|
||||
* @property-read int|null $transaction_journals_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TransactionType newQuery()
|
||||
* @method static Builder|TransactionType onlyTrashed()
|
||||
@ -57,12 +57,21 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
class TransactionType extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
/** @var string */
|
||||
public const WITHDRAWAL = 'Withdrawal';
|
||||
/** @var string */
|
||||
public const DEPOSIT = 'Deposit';
|
||||
/** @var string */
|
||||
public const TRANSFER = 'Transfer';
|
||||
/** @var string */
|
||||
public const OPENING_BALANCE = 'Opening balance';
|
||||
/** @var string */
|
||||
public const RECONCILIATION = 'Reconciliation';
|
||||
/** @var string */
|
||||
public const INVALID = 'Invalid';
|
||||
/** @var string */
|
||||
public const LIABILITY_CREDIT = 'Liability credit';
|
||||
/** @var string[] */
|
||||
protected $casts
|
||||
= [
|
||||
@ -70,7 +79,7 @@ class TransactionType extends Model
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
];
|
||||
/** @var string[] */
|
||||
/** @var string[] */
|
||||
protected $fillable = ['type'];
|
||||
|
||||
/**
|
||||
@ -78,8 +87,8 @@ class TransactionType extends Model
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
* @throws NotFoundHttpException
|
||||
* @return TransactionType
|
||||
* @throws NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $type): TransactionType
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user