mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-31 19:27:51 -06:00
35 lines
787 B
PHP
35 lines
787 B
PHP
<?php
|
|
|
|
|
|
class TransactionJournal extends Elegant
|
|
{
|
|
|
|
public static $rules
|
|
= [
|
|
'transaction_type_id' => 'required|exists:transaction_types,id',
|
|
'transaction_currency_id' => 'required|exists:transaction_currencies,id',
|
|
'description' => 'between:1,255',
|
|
'date' => 'date',
|
|
];
|
|
|
|
public function transactionType()
|
|
{
|
|
return $this->belongsTo('TransactionType');
|
|
}
|
|
|
|
public function transactionCurrency()
|
|
{
|
|
return $this->belongsTo('TransactionCurrency');
|
|
}
|
|
|
|
public function transactions()
|
|
{
|
|
return $this->hasMany('Transaction');
|
|
}
|
|
|
|
public function getDates()
|
|
{
|
|
return array('created_at', 'updated_at', 'date');
|
|
}
|
|
|
|
}
|