mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Restore enums, replace one to enforce php 8.1 compatibility.
This commit is contained in:
@@ -49,6 +49,22 @@ use Illuminate\Support\Carbon;
|
||||
*/
|
||||
class AccountType extends Model
|
||||
{
|
||||
public const ASSET = 'Asset account';
|
||||
public const BENEFICIARY = 'Beneficiary account';
|
||||
public const CASH = 'Cash account';
|
||||
public const CREDITCARD = 'Credit card';
|
||||
public const DEBT = 'Debt';
|
||||
public const DEFAULT = 'Default account';
|
||||
public const EXPENSE = 'Expense account';
|
||||
public const IMPORT = 'Import account';
|
||||
public const INITIAL_BALANCE = 'Initial balance account';
|
||||
public const LIABILITY_CREDIT = 'Liability credit account';
|
||||
public const LOAN = 'Loan';
|
||||
public const MORTGAGE = 'Mortgage';
|
||||
public const RECONCILIATION = 'Reconciliation account';
|
||||
public const REVENUE = 'Revenue account';
|
||||
|
||||
|
||||
/**
|
||||
* The attributes that should be casted to native types.
|
||||
*
|
||||
|
@@ -64,6 +64,9 @@ use Illuminate\Support\Carbon;
|
||||
*/
|
||||
class AutoBudget extends Model
|
||||
{
|
||||
public const AUTO_BUDGET_RESET = 1;
|
||||
public const AUTO_BUDGET_ROLLOVER = 2;
|
||||
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
|
@@ -62,6 +62,12 @@ use Illuminate\Support\Carbon;
|
||||
*/
|
||||
class RecurrenceRepetition extends Model
|
||||
{
|
||||
public const WEEKEND_DO_NOTHING = 1;
|
||||
public const WEEKEND_SKIP_CREATION = 2;
|
||||
public const WEEKEND_TO_FRIDAY = 3;
|
||||
public const WEEKEND_TO_MONDAY = 4;
|
||||
|
||||
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
|
@@ -56,10 +56,17 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
*/
|
||||
class TransactionType extends Model
|
||||
{
|
||||
public const DEPOSIT = 'Deposit';
|
||||
public const INVALID = 'Invalid';
|
||||
public const LIABILITY_CREDIT = 'Liability credit';
|
||||
public const OPENING_BALANCE = 'Opening balance';
|
||||
public const RECONCILIATION = 'Reconciliation';
|
||||
public const TRANSFER = 'Transfer';
|
||||
public const WITHDRAWAL = 'Withdrawal';
|
||||
use SoftDeletes;
|
||||
|
||||
protected $casts
|
||||
= [
|
||||
= [
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
|
@@ -53,6 +53,16 @@ use Illuminate\Support\Carbon;
|
||||
*/
|
||||
class UserRole extends Model
|
||||
{
|
||||
public const CHANGE_PIGGY_BANKS = 'change_piggies';
|
||||
public const CHANGE_REPETITIONS = 'change_reps';
|
||||
public const CHANGE_RULES = 'change_rules';
|
||||
public const CHANGE_TRANSACTIONS = 'change_tx';
|
||||
public const FULL = 'full';
|
||||
public const OWNER = 'owner';
|
||||
public const READ_ONLY = 'ro';
|
||||
public const VIEW_REPORTS = 'view_reports';
|
||||
|
||||
|
||||
protected $fillable = ['title'];
|
||||
|
||||
/**
|
||||
|
@@ -76,7 +76,19 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
*/
|
||||
class Webhook extends Model
|
||||
{
|
||||
|
||||
// dont forget to update the config in firefly.php
|
||||
public const DELIVERY_JSON = 300;
|
||||
public const RESPONSE_ACCOUNTS = 210;
|
||||
public const RESPONSE_NONE = 220;
|
||||
public const RESPONSE_TRANSACTIONS = 200;
|
||||
public const TRIGGER_DESTROY_TRANSACTION = 120;
|
||||
public const TRIGGER_STORE_TRANSACTION = 100;
|
||||
public const TRIGGER_UPDATE_TRANSACTION = 110;
|
||||
|
||||
|
||||
use SoftDeletes;
|
||||
|
||||
protected $casts
|
||||
= [
|
||||
'active' => 'boolean',
|
||||
|
Reference in New Issue
Block a user