mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-16 18:25:00 -06:00
Move account types to enum class.
This commit is contained in:
parent
b10c1044bd
commit
641683d431
44
app/Enums/AccountTypeEnum.php
Normal file
44
app/Enums/AccountTypeEnum.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/*
|
||||
* AccountTypeEnum.php
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Enums;
|
||||
|
||||
/**
|
||||
* enum AccountTypeEnum
|
||||
*/
|
||||
enum AccountTypeEnum: string
|
||||
{
|
||||
case ASSET = 'Asset account';
|
||||
case BENEFICIARY = 'Beneficiary account';
|
||||
case CASH = 'Cash account';
|
||||
case CREDITCARD = 'Credit card';
|
||||
case DEBT = 'Debt';
|
||||
case DEFAULT = 'Default account';
|
||||
case EXPENSE = 'Expense account';
|
||||
case IMPORT = 'Import account';
|
||||
case INITIAL_BALANCE = 'Initial balance account';
|
||||
case LIABILITY_CREDIT = 'Liability credit account';
|
||||
case LOAN = 'Loan';
|
||||
case MORTGAGE = 'Mortgage';
|
||||
case RECONCILIATION = 'Reconciliation account';
|
||||
case REVENUE = 'Revenue account';
|
||||
|
||||
}
|
@ -49,34 +49,6 @@ use Illuminate\Support\Carbon;
|
||||
*/
|
||||
class AccountType extends Model
|
||||
{
|
||||
/** @var string */
|
||||
public const ASSET = 'Asset account';
|
||||
/** @var string */
|
||||
public const BENEFICIARY = 'Beneficiary account';
|
||||
/** @var string */
|
||||
public const CASH = 'Cash account';
|
||||
/** @var string */
|
||||
public const CREDITCARD = 'Credit card';
|
||||
/** @var string */
|
||||
public const DEBT = 'Debt';
|
||||
/** @var string */
|
||||
public const DEFAULT = 'Default account';
|
||||
/** @var string */
|
||||
public const EXPENSE = 'Expense account';
|
||||
/** @var string */
|
||||
public const IMPORT = 'Import account';
|
||||
/** @var string */
|
||||
public const INITIAL_BALANCE = 'Initial balance account';
|
||||
/** @var string */
|
||||
public const LIABILITY_CREDIT = 'Liability credit account';
|
||||
/** @var string */
|
||||
public const LOAN = 'Loan';
|
||||
/** @var string */
|
||||
public const MORTGAGE = 'Mortgage';
|
||||
/** @var string */
|
||||
public const RECONCILIATION = 'Reconciliation account';
|
||||
/** @var string */
|
||||
public const REVENUE = 'Revenue account';
|
||||
/**
|
||||
* The attributes that should be casted to native types.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user