mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-05 21:53:08 -06:00
31 lines
580 B
PHP
31 lines
580 B
PHP
<?php namespace FireflyIII\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Budget extends Model
|
|
{
|
|
|
|
|
|
public function budgetlimits()
|
|
{
|
|
return $this->hasMany('BudgetLimit');
|
|
}
|
|
|
|
public function limitrepetitions()
|
|
{
|
|
return $this->hasManyThrough('LimitRepetition', 'BudgetLimit', 'budget_id');
|
|
}
|
|
|
|
public function transactionjournals()
|
|
{
|
|
return $this->belongsToMany('TransactionJournal', 'budget_transaction_journal', 'budget_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('User');
|
|
}
|
|
|
|
|
|
}
|