Skip to content

Firefly III: a personal finances manager

Merge branch 'main' into develop

James Cole37671499c822
diff --cc app/Models/AccountType.php
index 79e8493bc8,81cfbdc197..013b7269bd
--- a/app/Models/AccountType.php
+++ b/app/Models/AccountType.php
@@@ -35,33 -34,19 +35,46 @@@ class AccountType extends Mode
{
use ReturnsIntegerIdTrait;
+ /** @deprecated */
public const string ASSET = 'Asset account';
++
+ /** @deprecated */
public const string BENEFICIARY = 'Beneficiary account';
++
+ /** @deprecated */
public const string CASH = 'Cash account';
++
+ /** @deprecated */
public const string CREDITCARD = 'Credit card';
++
+ /** @deprecated */
public const string DEBT = 'Debt';
++
+ /** @deprecated */
public const string DEFAULT = 'Default account';
++
+ /** @deprecated */
public const string EXPENSE = 'Expense account';
++
+ /** @deprecated */
public const string IMPORT = 'Import account';
++
+ /** @deprecated */
public const string INITIAL_BALANCE = 'Initial balance account';
++
+ /** @deprecated */
public const string LIABILITY_CREDIT = 'Liability credit account';
++
+ /** @deprecated */
public const string LOAN = 'Loan';
++
+ /** @deprecated */
public const string MORTGAGE = 'Mortgage';
++
+ /** @deprecated */
public const string RECONCILIATION = 'Reconciliation account';
++
+ /** @deprecated */
public const string REVENUE = 'Revenue account';
protected $casts
@@@ -76,11 -61,4 +89,11 @@@
{
return $this->hasMany(Account::class);
}
+
+ protected function casts(): array
+ {
+ return [
- //'type' => AccountTypeEnum::class,
++ // 'type' => AccountTypeEnum::class,
+ ];
+ }
}
diff --cc app/Models/AutoBudget.php
index 571c444fe6,a61eaa6a1f..b92f5f5b17
--- a/app/Models/AutoBudget.php
+++ b/app/Models/AutoBudget.php
@@@ -54,13 -53,6 +54,13 @@@ class AutoBudget extends Mode
return $this->belongsTo(TransactionCurrency::class);
}
+ protected function casts(): array
+ {
+ return [
- //'auto_budget_type' => AutoBudgetType::class,
++ // 'auto_budget_type' => AutoBudgetType::class,
+ ];
+ }
+
protected function amount(): Attribute
{
return Attribute::make(
diff --cc app/Models/RecurrenceRepetition.php
index 1333b3b5b3,e669ed02a3..525bb7edfa
--- a/app/Models/RecurrenceRepetition.php
+++ b/app/Models/RecurrenceRepetition.php
@@@ -59,13 -58,6 +59,13 @@@ class RecurrenceRepetition extends Mode
/** @var string The table to store the data in */
protected $table = 'recurrences_repetitions';
+ protected function casts(): array
+ {
+ return [
- //'weekend' => RecurrenceRepetitionWeekend::class,
++ // 'weekend' => RecurrenceRepetitionWeekend::class,
+ ];
+ }
+
public function recurrence(): BelongsTo
{
return $this->belongsTo(Recurrence::class);
diff --cc app/Models/TransactionType.php
index abf51f9486,5f9b5f7111..03d0fda5a2
--- a/app/Models/TransactionType.php
+++ b/app/Models/TransactionType.php
@@@ -54,13 -53,6 +54,13 @@@ class TransactionType extends Mode
];
protected $fillable = ['type'];
+ protected function casts(): array
+ {
+ return [
- //'type' => TransactionTypeEnum::class,
++ // 'type' => TransactionTypeEnum::class,
+ ];
+ }
+
/**
* Route binder. Converts the key in the URL to the specified object (or throw 404).
*
diff --cc app/Models/Webhook.php
index 6a26f29471,11bceb0f04..19c392270e
--- a/app/Models/Webhook.php
+++ b/app/Models/Webhook.php
@@@ -53,15 -53,6 +53,15 @@@ class Webhook extends Mode
];
protected $fillable = ['active', 'trigger', 'response', 'delivery', 'user_id', 'user_group_id', 'url', 'title', 'secret'];
+ protected function casts(): array
+ {
+ return [
- // 'delivery' => WebhookDelivery::class,
- // 'response' => WebhookResponse::class,
- // 'trigger' => WebhookTrigger::class,
++ // 'delivery' => WebhookDelivery::class,
++ // 'response' => WebhookResponse::class,
++ // 'trigger' => WebhookTrigger::class,
+ ];
+ }
+
public static function getDeliveries(): array
{
$array = [];