firefly-iii/app/models/Category.php
2014-08-10 18:22:42 +02:00

40 lines
1.9 KiB
PHP

<?php
/**
* Category
*
* @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|\Transaction[] $transactions
* @property-read \Illuminate\Database\Eloquent\Collection|\TransactionJournal[] $transactionjournals
* @property-read \User $user
* @method static \Illuminate\Database\Query\Builder|\Category whereId($value)
* @method static \Illuminate\Database\Query\Builder|\Category whereCreatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\Category whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\Category whereName($value)
* @method static \Illuminate\Database\Query\Builder|\Category whereUserId($value)
* @method static \Illuminate\Database\Query\Builder|\Category whereClass($value)
* @property-read \Limit $limits
*/
class Category extends Component
{
public static $factory
= [
'name' => 'string',
'user_id' => 'factory|User',
'class' => 'Category'
];
protected $isSubclass = true;
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function transactionjournals()
{
return $this->belongsToMany('TransactionJournal', 'component_transaction_journal', 'component_id');
}
}