lubo_comment_query/app/Models/VideoDanmakus.php

22 lines
544 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class VideoDanmakus extends Model
{
protected $guarded = [];
protected $table = "video_danmakus";
protected $dateFormat = 'U';
public $timestamps = false;
protected $casts = [
'created_at' => 'datetime:Y-m-d H:i:s',
];
protected $fillable = ["from", "from_mid", "content"];
public function video(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Videos::class, "video_bvid", "bvid");
}
}