firefly-iii/app/models/AccountType.php

34 lines
1.1 KiB
PHP
Raw Normal View History

<?php
2014-07-15 15:16:29 -05:00
/**
* AccountType
*
2014-08-30 07:26:33 -05:00
* @property integer $id
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @property string $type
* @property boolean $editable
2014-07-15 15:16:29 -05:00
* @property-read \Illuminate\Database\Eloquent\Collection|\Account[] $accounts
2014-08-28 00:53:54 -05:00
* @method static \Illuminate\Database\Query\Builder|\AccountType whereId($value)
* @method static \Illuminate\Database\Query\Builder|\AccountType whereCreatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\AccountType whereUpdatedAt($value)
2014-08-30 07:26:33 -05:00
* @method static \Illuminate\Database\Query\Builder|\AccountType whereType($value)
* @method static \Illuminate\Database\Query\Builder|\AccountType whereEditable($value)
2014-07-15 15:16:29 -05:00
*/
2014-07-09 06:19:30 -05:00
class AccountType extends Eloquent
{
2014-08-30 07:26:33 -05:00
public static $rules
= [
'type' => ['required', 'between:1,50', 'alphabasic'],
'editable' => 'required|boolean',
];
2014-08-10 11:22:42 -05:00
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
2014-07-09 06:19:30 -05:00
public function accounts()
{
return $this->hasMany('Account');
}
}