firefly-iii/app/models/Budget.php

43 lines
1.5 KiB
PHP
Raw Normal View History

<?php
2014-07-15 15:16:29 -05:00
/**
* Budget
*
2014-08-31 00:32:48 -05:00
* @property integer $id
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @property string $name
* @property integer $user_id
* @property string $class
* @property-read \Illuminate\Database\Eloquent\Collection|\Limit[] $limits
2014-07-15 15:16:29 -05:00
* @property-read \Illuminate\Database\Eloquent\Collection|\TransactionJournal[] $transactionjournals
2014-08-31 00:32:48 -05:00
* @property-read \Illuminate\Database\Eloquent\Collection|\Transaction[] $transactions
* @property-read \User $user
2014-11-10 11:38:58 -06:00
* @method static \Illuminate\Database\Query\Builder|\Budget whereId($value)
* @method static \Illuminate\Database\Query\Builder|\Budget whereCreatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\Budget whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\Budget whereName($value)
* @method static \Illuminate\Database\Query\Builder|\Budget whereUserId($value)
* @method static \Illuminate\Database\Query\Builder|\Budget whereClass($value)
2014-07-15 15:16:29 -05:00
*/
class Budget extends Component
{
protected $isSubclass = true;
2014-08-10 11:22:42 -05:00
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function limits()
{
return $this->hasMany('Limit', 'component_id');
}
2014-08-10 11:22:42 -05:00
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany|\TransactionJournal
2014-08-10 11:22:42 -05:00
*/
2014-07-30 00:14:00 -05:00
public function transactionjournals()
{
return $this->belongsToMany('TransactionJournal', 'component_transaction_journal', 'component_id');
}
}