mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-08 23:24:07 -06:00
38 lines
663 B
PHP
38 lines
663 B
PHP
|
<?php
|
||
|
use LaravelBook\Ardent\Ardent;
|
||
|
|
||
|
class TransactionGroup extends Ardent
|
||
|
{
|
||
|
|
||
|
public static $rules = [
|
||
|
'relation' => 'required|in:balance'
|
||
|
];
|
||
|
|
||
|
/**
|
||
|
* @return array
|
||
|
*/
|
||
|
public function getDates()
|
||
|
{
|
||
|
return ['created_at', 'updated_at'];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||
|
*/
|
||
|
public function transactionjournals()
|
||
|
{
|
||
|
return $this->belongsToMany('TransactionJournal');
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* User
|
||
|
*
|
||
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||
|
*/
|
||
|
public function user()
|
||
|
{
|
||
|
return $this->belongsTo('User');
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|