Add invalid transaction type.

This commit is contained in:
James Cole 2021-03-12 06:11:50 +01:00
parent b0c9745982
commit aec70cf6a0
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
2 changed files with 4 additions and 22 deletions

View File

@ -57,39 +57,20 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class TransactionType extends Model
{
use SoftDeletes;
/**
*
*/
public const WITHDRAWAL = 'Withdrawal';
/**
*
*/
public const DEPOSIT = 'Deposit';
/**
*
*/
public const TRANSFER = 'Transfer';
/**
*
*/
public const OPENING_BALANCE = 'Opening balance';
/**
*
*/
public const RECONCILIATION = 'Reconciliation';
/**
* The attributes that should be casted to native types.
*
* @var array
*/
public const INVALID = 'Invalid';
/** @var string[] */
protected $casts
= [
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime',
];
/** @var array Fields that can be filled */
/** @var string[] */
protected $fillable = ['type'];
/**

View File

@ -39,6 +39,7 @@ class TransactionTypeSeeder extends Seeder
TransactionType::TRANSFER,
TransactionType::OPENING_BALANCE,
TransactionType::RECONCILIATION,
TransactionType::INVALID
];
foreach ($types as $type) {