From 952bb1e38e6935751ce190d11ec529b5246d696b Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 7 Oct 2024 18:04:17 +1100 Subject: [PATCH] Fix local casting overriding class casting --- app/Models/Abstracted/Catalog.php | 6 ------ app/Models/Photo.php | 6 ++++-- app/Models/Video.php | 3 ++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/Models/Abstracted/Catalog.php b/app/Models/Abstracted/Catalog.php index 4579216..c5a10f7 100644 --- a/app/Models/Abstracted/Catalog.php +++ b/app/Models/Abstracted/Catalog.php @@ -17,12 +17,6 @@ abstract class Catalog extends Model { protected static $includeSubSecTime = FALSE; - protected $casts = [ - 'created_manual' => 'datetime', - 'subsectime' => 'int', - 'thumbnail' => PostgresBytea::class, - ]; - public const fs = 'nas'; private ?string $move_reason; diff --git a/app/Models/Photo.php b/app/Models/Photo.php index acf13b2..eaed2b7 100644 --- a/app/Models/Photo.php +++ b/app/Models/Photo.php @@ -16,8 +16,10 @@ class Photo extends Abstracted\Catalog public const config = 'photo'; protected $casts = [ - 'created'=>'datetime:Y-m-d H:i:s', - 'thumbnail'=>PostgresBytea::class, + 'created' => 'datetime:Y-m-d H:i:s', + 'created_manual' => 'datetime:Y-m-d H:i:s', + 'subsectime' => 'int', + 'thumbnail' => PostgresBytea::class, ]; protected static $includeSubSecTime = TRUE; diff --git a/app/Models/Video.php b/app/Models/Video.php index e2c4802..4e24ab8 100644 --- a/app/Models/Video.php +++ b/app/Models/Video.php @@ -9,7 +9,8 @@ class Video extends Abstracted\Catalog public const config = 'video'; protected $casts = [ - 'created'=>'datetime:Y-m-d H:i:s', + 'created' => 'datetime:Y-m-d H:i:s', + 'created_manual' => 'datetime:Y-m-d H:i:s', ]; // Media Object