mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-17 20:08:52 +00:00
36 lines
748 B
PHP
36 lines
748 B
PHP
<?php namespace FireflyIII\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Budget extends Model
|
|
{
|
|
|
|
|
|
public function budgetlimits()
|
|
{
|
|
return $this->hasMany('FireflyIII\Models\BudgetLimit');
|
|
}
|
|
|
|
public function getDates()
|
|
{
|
|
return ['created_at', 'updated_at', 'deleted_at'];
|
|
}
|
|
|
|
public function limitrepetitions()
|
|
{
|
|
return $this->hasManyThrough('FireflyIII\Models\LimitRepetition', 'BudgetLimit', 'budget_id');
|
|
}
|
|
|
|
public function transactionjournals()
|
|
{
|
|
return $this->belongsToMany('FireflyIII\Models\TransactionJournal', 'budget_transaction_journal', 'budget_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('FireflyIII\User');
|
|
}
|
|
|
|
|
|
}
|