From ce19008a82b0ef10dc906cfc59f77b5133d60373 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Thu, 27 Oct 2022 12:43:57 +0200 Subject: [PATCH] cast user ID references to string --- app/Models/Application.php | 4 ++++ app/Models/Participant.php | 1 + app/Models/Protocol.php | 1 + app/Models/Round.php | 1 + 4 files changed, 7 insertions(+) diff --git a/app/Models/Application.php b/app/Models/Application.php index 327d3fb..100da43 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -18,6 +18,10 @@ class Application extends Model return $this->belongsTo(User::class); } + protected $casts = [ + 'user_id' => 'string', + ]; + protected $with = [ 'user', ]; diff --git a/app/Models/Participant.php b/app/Models/Participant.php index 38ecfda..6e8abbe 100644 --- a/app/Models/Participant.php +++ b/app/Models/Participant.php @@ -106,6 +106,7 @@ class Participant extends Model protected $casts = [ 'roles' => 'array', + 'user_id' => 'string', ]; protected $fillable = [ diff --git a/app/Models/Protocol.php b/app/Models/Protocol.php index ce081e7..b747b12 100644 --- a/app/Models/Protocol.php +++ b/app/Models/Protocol.php @@ -288,6 +288,7 @@ class Protocol extends Model protected $casts = [ 'details' => 'array', + 'user_id' => 'string', ]; protected $fillable = [ diff --git a/app/Models/Round.php b/app/Models/Round.php index 0f4847a..7daa779 100644 --- a/app/Models/Round.php +++ b/app/Models/Round.php @@ -111,6 +111,7 @@ class Round extends Model 'code' => 'array', 'locked' => 'boolean', 'no_record' => 'boolean', + 'rolled_by' => 'string', ]; protected $fillable = [ -- 2.39.2