. */ declare(strict_types=1); namespace FireflyIII\Models; use Carbon\Carbon; use Eloquent; use FireflyIII\Support\Models\ReturnsIntegerIdTrait; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; /** * FireflyIII\Models\AccountType * * @property int $id * @property null|Carbon $created_at * @property null|Carbon $updated_at * @property string $type * @property Account[]|Collection $accounts * @property null|int $accounts_count * * @method static Builder|AccountType newModelQuery() * @method static Builder|AccountType newQuery() * @method static Builder|AccountType query() * @method static Builder|AccountType whereCreatedAt($value) * @method static Builder|AccountType whereId($value) * @method static Builder|AccountType whereType($value) * @method static Builder|AccountType whereUpdatedAt($value) * * @mixin Eloquent */ class AccountType extends Model { use ReturnsIntegerIdTrait; public const string ASSET = 'Asset account'; public const string BENEFICIARY = 'Beneficiary account'; public const string CASH = 'Cash account'; public const string CREDITCARD = 'Credit card'; public const string DEBT = 'Debt'; public const string DEFAULT = 'Default account'; public const string EXPENSE = 'Expense account'; public const string IMPORT = 'Import account'; public const string INITIAL_BALANCE = 'Initial balance account'; public const string LIABILITY_CREDIT = 'Liability credit account'; public const string LOAN = 'Loan'; public const string MORTGAGE = 'Mortgage'; public const string RECONCILIATION = 'Reconciliation account'; public const string REVENUE = 'Revenue account'; protected $casts = [ 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; protected $fillable = ['type']; public function accounts(): HasMany { return $this->hasMany(Account::class); } }