diff --git a/app/Models/Badge.php b/app/Models/Badge.php index d6bc32b..3764a41 100644 --- a/app/Models/Badge.php +++ b/app/Models/Badge.php @@ -9,6 +9,8 @@ class Badge extends Model { use HasFactory; + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $guarded = ['id', 'created_at', 'updated_at']; public function users() diff --git a/app/Models/Config.php b/app/Models/Config.php index b6e278a..83623b4 100644 --- a/app/Models/Config.php +++ b/app/Models/Config.php @@ -9,6 +9,8 @@ class Config extends Model { use HasFactory; + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = [ 'type', 'data' diff --git a/app/Models/File.php b/app/Models/File.php index d7212dd..6fc6775 100644 --- a/app/Models/File.php +++ b/app/Models/File.php @@ -10,6 +10,9 @@ class File extends Model { use HasFactory; + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = [ 'user_id', 'storage', diff --git a/app/Models/Log.php b/app/Models/Log.php index e8fc464..c470720 100644 --- a/app/Models/Log.php +++ b/app/Models/Log.php @@ -10,6 +10,9 @@ class Log extends Model { use HasFactory; + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = [ 'type', 'user_id', diff --git a/app/Models/Mission.php b/app/Models/Mission.php index dc2127c..acbf320 100644 --- a/app/Models/Mission.php +++ b/app/Models/Mission.php @@ -17,6 +17,9 @@ class Mission extends Model * * @var string[] */ + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = [ 'user_id', 'survey_id', diff --git a/app/Models/Survey.php b/app/Models/Survey.php index 65f61c9..39e9938 100644 --- a/app/Models/Survey.php +++ b/app/Models/Survey.php @@ -15,6 +15,9 @@ class Survey extends Model * * @var array */ + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = ['name', 'settings', 'user_id']; /** diff --git a/app/Models/SurveyAnswer.php b/app/Models/SurveyAnswer.php index 70f55e3..8748178 100644 --- a/app/Models/SurveyAnswer.php +++ b/app/Models/SurveyAnswer.php @@ -15,6 +15,9 @@ class SurveyAnswer extends Model * * @var array */ + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = ['value', 'survey_question_id', 'survey_entry_id']; /** diff --git a/app/Models/SurveyEntry.php b/app/Models/SurveyEntry.php index da55270..e1fe5fb 100644 --- a/app/Models/SurveyEntry.php +++ b/app/Models/SurveyEntry.php @@ -16,6 +16,9 @@ class SurveyEntry extends Model * * @var array */ + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = ['survey_id', 'participant_id']; protected $casts = [ diff --git a/app/Models/SurveyQuestion.php b/app/Models/SurveyQuestion.php index ea29730..ff70d96 100644 --- a/app/Models/SurveyQuestion.php +++ b/app/Models/SurveyQuestion.php @@ -16,6 +16,9 @@ class SurveyQuestion extends Model * * @var array */ + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = ['type', 'options', 'title', 'content', 'rules', 'survey_id', 'survey_section_id']; protected $casts = [ diff --git a/app/Models/SurveySection.php b/app/Models/SurveySection.php index 2e7ce91..d4446c6 100644 --- a/app/Models/SurveySection.php +++ b/app/Models/SurveySection.php @@ -15,6 +15,9 @@ class SurveySection extends Model * * @var array */ + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = ['name', 'description']; /** diff --git a/app/Models/Updater.php b/app/Models/Updater.php index 1b8e845..10fef49 100644 --- a/app/Models/Updater.php +++ b/app/Models/Updater.php @@ -15,6 +15,9 @@ class Updater extends Model * * @var string[] */ + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = [ 'user_id', 'version', diff --git a/app/Models/User.php b/app/Models/User.php index 61cd9ca..b2cf733 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -22,6 +22,9 @@ class User extends Authenticatable implements BannableContract * * @var array */ + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = [ 'name', 'email', diff --git a/app/Models/UserAccount.php b/app/Models/UserAccount.php index 9fc2c87..1cbd4be 100644 --- a/app/Models/UserAccount.php +++ b/app/Models/UserAccount.php @@ -15,6 +15,9 @@ class UserAccount extends Model * * @var array */ + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = [ 'user_id', 'provider', diff --git a/app/Models/UserBadge.php b/app/Models/UserBadge.php index a6afa2c..16a8000 100644 --- a/app/Models/UserBadge.php +++ b/app/Models/UserBadge.php @@ -15,6 +15,9 @@ class UserBadge extends Model 'badge_id' ]; + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $casts = [ 'created_at' => 'datetime', 'updated_at' => 'datetime' diff --git a/app/Models/UserMission.php b/app/Models/UserMission.php index 098f8d9..7eee6c7 100644 --- a/app/Models/UserMission.php +++ b/app/Models/UserMission.php @@ -10,6 +10,9 @@ class UserMission extends Model { use HasFactory; + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = [ 'user_id', 'mission_id', diff --git a/app/Models/UserRecord.php b/app/Models/UserRecord.php index 9683c97..4d4d8b2 100644 --- a/app/Models/UserRecord.php +++ b/app/Models/UserRecord.php @@ -10,6 +10,9 @@ class UserRecord extends Model { use HasFactory; + + protected $dateFormat = 'Y-m-d H:i:s.u'; + protected $fillable = [ 'user_id', 'recorder_id',