diff --git a/app/Models/ProgramAppends.php b/app/Models/ProgramAppends.php index e0e3d1b..f5476c2 100644 --- a/app/Models/ProgramAppends.php +++ b/app/Models/ProgramAppends.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Model; class ProgramAppends extends Model { protected $fillable = ["name", "from", "price", "append"]; - protected $dateFormat = "U"; public function program(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Programs::class, "program_id", "id"); diff --git a/app/Models/ProgramVideos.php b/app/Models/ProgramVideos.php index feca603..2f64cdb 100644 --- a/app/Models/ProgramVideos.php +++ b/app/Models/ProgramVideos.php @@ -9,7 +9,6 @@ use Illuminate\Support\Carbon; class ProgramVideos extends Model { protected $fillable = ["video_bvid", "start_part", "start_time", "stop_part", "stop_time"]; - protected $dateFormat = 'U'; public function program(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Programs::class, "program_id", "id"); diff --git a/app/Models/Programs.php b/app/Models/Programs.php index 6f4cb3a..9bb0054 100644 --- a/app/Models/Programs.php +++ b/app/Models/Programs.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Model; class Programs extends Model { protected $fillable = ["name", "difficulty", "desc"]; - protected $dateFormat = 'U'; public function appends(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(ProgramAppends::class, "program_id", "id")->orderByDesc("is_original")->orderBy("created_at"); diff --git a/app/Models/VideoComments.php b/app/Models/VideoComments.php index d06017f..c3430bb 100644 --- a/app/Models/VideoComments.php +++ b/app/Models/VideoComments.php @@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\Model; class VideoComments extends Model { + protected $dateFormat = 'U'; public function video(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Videos::class, "aid", "id"); diff --git a/app/Models/VideoDanmakus.php b/app/Models/VideoDanmakus.php index a08225e..41af5ad 100644 --- a/app/Models/VideoDanmakus.php +++ b/app/Models/VideoDanmakus.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class VideoDanmakus extends Model { protected $table = "video_danmakus"; + protected $dateFormat = 'U'; public function video(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Videos::class, "video_bvid", "bvid"); diff --git a/app/Models/Videos.php b/app/Models/Videos.php index 9acfa9d..30220af 100644 --- a/app/Models/Videos.php +++ b/app/Models/Videos.php @@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\Model; class Videos extends Model { + protected $dateFormat = 'U'; public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(VideoComments::class, "aid", "id");