mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
🤖 Auto commit for release 'develop' on 2025-05-29
This commit is contained in:
@@ -106,6 +106,7 @@ class Account extends Model
|
||||
->where('name', 'account_number')
|
||||
->first()
|
||||
;
|
||||
|
||||
return null !== $metaValue ? $metaValue->data : '';
|
||||
});
|
||||
}
|
||||
@@ -122,6 +123,7 @@ class Account extends Model
|
||||
if (AccountTypeEnum::CASH->value === $this->accountType->type) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $name;
|
||||
});
|
||||
}
|
||||
@@ -221,6 +223,7 @@ class Account extends Model
|
||||
get: static fn ($value) => (string) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -45,7 +45,7 @@ class AccountMeta extends Model
|
||||
|
||||
protected function data(): Attribute
|
||||
{
|
||||
return Attribute::make(get: fn(mixed $value) => (string) json_decode((string) $value, true), set: fn(mixed $value) => ['data' => json_encode($value)]);
|
||||
return Attribute::make(get: fn (mixed $value) => (string) json_decode((string) $value, true), set: fn (mixed $value) => ['data' => json_encode($value)]);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
|
@@ -100,6 +100,7 @@ class Attachment extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -58,6 +58,7 @@ class AuditLogEntry extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -103,6 +103,7 @@ class AvailableBudget extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -185,6 +185,7 @@ class Bill extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -112,6 +112,7 @@ class Budget extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -109,6 +109,7 @@ class BudgetLimit extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -94,6 +94,7 @@ class Category extends Model
|
||||
{
|
||||
return $this->belongsToMany(Transaction::class, 'category_transaction', 'category_id');
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -41,13 +41,11 @@ class Configuration extends Model
|
||||
/**
|
||||
* TODO can be replaced with native laravel code.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function data(): Attribute
|
||||
{
|
||||
return Attribute::make(get: fn($value) => json_decode((string) $value), set: fn($value) => ['data' => json_encode($value)]);
|
||||
return Attribute::make(get: fn ($value) => json_decode((string) $value), set: fn ($value) => ['data' => json_encode($value)]);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
|
@@ -81,6 +81,7 @@ class CurrencyExchangeRate extends Model
|
||||
get: static fn ($value) => (string) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -59,6 +59,7 @@ class GroupMembership extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -60,6 +60,7 @@ class InvitedUser extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -58,6 +58,7 @@ class LinkType extends Model
|
||||
{
|
||||
return $this->hasMany(TransactionJournalLink::class);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -72,6 +72,7 @@ class Location extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -50,6 +50,7 @@ class Note extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -96,6 +96,7 @@ class ObjectGroup extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -140,6 +140,7 @@ class PiggyBank extends Model
|
||||
get: static fn ($value) => (string) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -71,6 +71,7 @@ class PiggyBankEvent extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -94,6 +94,7 @@ class PiggyBankRepetition extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -93,6 +93,7 @@ class Preference extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -119,6 +119,7 @@ class Recurrence extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -50,6 +50,7 @@ class RecurrenceMeta extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -133,6 +133,7 @@ class RecurrenceTransaction extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -50,6 +50,7 @@ class RecurrenceTransactionMeta extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -38,6 +38,7 @@ class Role extends Model
|
||||
{
|
||||
return $this->belongsToMany(User::class);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -84,12 +84,9 @@ class Rule extends Model
|
||||
return $this->hasMany(RuleTrigger::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
*/
|
||||
protected function description(): Attribute
|
||||
{
|
||||
return Attribute::make(set: fn($value) => ['description' => e($value)]);
|
||||
return Attribute::make(set: fn ($value) => ['description' => e($value)]);
|
||||
}
|
||||
|
||||
public function userGroup(): BelongsTo
|
||||
@@ -110,6 +107,7 @@ class Rule extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -79,6 +79,7 @@ class RuleAction extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -80,6 +80,7 @@ class RuleGroup extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -52,6 +52,7 @@ class RuleTrigger extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -86,6 +86,7 @@ class Tag extends Model
|
||||
{
|
||||
return $this->belongsToMany(TransactionJournal::class);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -200,6 +200,7 @@ class Transaction extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -107,6 +107,7 @@ class TransactionCurrency extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -85,6 +85,7 @@ class TransactionGroup extends Model
|
||||
{
|
||||
return $this->belongsTo(UserGroup::class);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -244,6 +244,7 @@ class TransactionJournal extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -103,6 +103,7 @@ class TransactionJournalLink extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -40,15 +40,15 @@ class TransactionJournalMeta extends Model
|
||||
protected $fillable = ['transaction_journal_id', 'name', 'data', 'hash'];
|
||||
|
||||
protected $table = 'journal_meta';
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function data(): Attribute
|
||||
{
|
||||
return Attribute::make(get: fn($value) => json_decode((string) $value, false), set: function ($value) {
|
||||
$data = json_encode($value);
|
||||
return Attribute::make(get: fn ($value) => json_decode((string) $value, false), set: function ($value) {
|
||||
$data = json_encode($value);
|
||||
|
||||
return ['data' => $data, 'hash' => hash('sha256', (string) $data)];
|
||||
});
|
||||
}
|
||||
@@ -64,6 +64,7 @@ class TransactionJournalMeta extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
@@ -85,6 +85,7 @@ class WebhookMessage extends Model
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
Reference in New Issue
Block a user