mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-05 13:44:58 -06:00
Merge remote-tracking branch 'origin/develop' into feature/abn-amro-import-specifix
This commit is contained in:
commit
f2fa5e140b
@ -12,6 +12,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Database\Query\Builder;
|
use Illuminate\Database\Query\Builder;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FireflyIII\Models\TransactionJournal
|
* FireflyIII\Models\TransactionJournal
|
||||||
@ -54,13 +55,24 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|||||||
*/
|
*/
|
||||||
class TransactionJournal extends Model
|
class TransactionJournal extends Model
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes, ValidatingTrait;
|
||||||
|
|
||||||
|
|
||||||
protected $fillable
|
protected $fillable
|
||||||
= ['user_id', 'transaction_type_id', 'bill_id', 'transaction_currency_id', 'description', 'completed', 'date', 'encrypted', 'tag_count'];
|
= ['user_id', 'transaction_type_id', 'bill_id', 'transaction_currency_id', 'description', 'completed', 'date', 'encrypted', 'tag_count'];
|
||||||
protected $hidden = ['encrypted'];
|
protected $hidden = ['encrypted'];
|
||||||
protected $dates = ['created_at', 'updated_at', 'date', 'deleted_at'];
|
protected $dates = ['created_at', 'updated_at', 'date', 'deleted_at'];
|
||||||
|
protected $rules
|
||||||
|
= [
|
||||||
|
'user_id' => 'required|exists:users,id',
|
||||||
|
'transaction_type_id' => 'required|exists:transaction_types,id',
|
||||||
|
'bill_id' => 'exists:bills,id',
|
||||||
|
'transaction_currency_id' => 'required|exists:transaction_currencies,id',
|
||||||
|
'description' => 'required|between:1,1024',
|
||||||
|
'completed' => 'required|boolean',
|
||||||
|
'date' => 'required|date',
|
||||||
|
'encrypted' => 'required|boolean',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
|
Loading…
Reference in New Issue
Block a user