Refactor models.

This commit is contained in:
James Cole
2025-09-14 09:00:01 +02:00
parent 935453796e
commit 9d9483e20f
46 changed files with 688 additions and 676 deletions

View File

@@ -95,6 +95,18 @@ class RecurrenceTransaction extends Model
);
}
protected function casts(): array
{
return [
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime',
'amount' => 'string',
'foreign_amount' => 'string',
'description' => 'string',
];
}
protected function destinationId(): Attribute
{
return Attribute::make(
@@ -136,16 +148,4 @@ class RecurrenceTransaction extends Model
get: static fn($value) => (int)$value,
);
}
protected function casts(): array
{
return [
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime',
'amount' => 'string',
'foreign_amount' => 'string',
'description' => 'string',
];
}
}