New account and transaction types

This commit is contained in:
James Cole 2021-04-10 17:25:24 +02:00
parent 41d1ef27b5
commit bff274d058
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
2 changed files with 19 additions and 8 deletions

View File

@ -74,6 +74,8 @@ class AccountType extends Model
public const MORTGAGE = 'Mortgage'; public const MORTGAGE = 'Mortgage';
/** @var string */ /** @var string */
public const CREDITCARD = 'Credit card'; public const CREDITCARD = 'Credit card';
/** @var string */
public const LIABILITY_CREDIT = 'Liability credit account';
/** /**
* The attributes that should be casted to native types. * The attributes that should be casted to native types.
* *

View File

@ -57,12 +57,21 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class TransactionType extends Model class TransactionType extends Model
{ {
use SoftDeletes; use SoftDeletes;
/** @var string */
public const WITHDRAWAL = 'Withdrawal'; public const WITHDRAWAL = 'Withdrawal';
/** @var string */
public const DEPOSIT = 'Deposit'; public const DEPOSIT = 'Deposit';
/** @var string */
public const TRANSFER = 'Transfer'; public const TRANSFER = 'Transfer';
/** @var string */
public const OPENING_BALANCE = 'Opening balance'; public const OPENING_BALANCE = 'Opening balance';
/** @var string */
public const RECONCILIATION = 'Reconciliation'; public const RECONCILIATION = 'Reconciliation';
/** @var string */
public const INVALID = 'Invalid'; public const INVALID = 'Invalid';
/** @var string */
public const LIABILITY_CREDIT = 'Liability credit';
/** @var string[] */ /** @var string[] */
protected $casts protected $casts
= [ = [
@ -78,8 +87,8 @@ class TransactionType extends Model
* *
* @param string $type * @param string $type
* *
* @throws NotFoundHttpException
* @return TransactionType * @return TransactionType
* @throws NotFoundHttpException
*/ */
public static function routeBinder(string $type): TransactionType public static function routeBinder(string $type): TransactionType
{ {