hasMany(VideoComments::class, "aid", "id"); } public function program_pivots(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(ProgramVideos::class, "video_bvid", "bvid"); } public function programs(): \Illuminate\Database\Eloquent\Relations\HasManyThrough { return $this->hasManyThrough(Programs::class, ProgramVideos::class, "video_bvid", "id", "bvid", "program_id")->orderBy("created_at"); } public function danmakus(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(VideoDanmakus::class, "video_bvid", "bvid"); } public function bilibili_danmakus(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->danmakus()->where("platform_id", "=", 1); } public function ixigua_danmakus(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->danmakus()->where("platform_id", "=", 2); } public function douyin_danmakus(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->danmakus()->where("platform_id", "=", 3); } }