<?php

namespace App\Domain\Videos\Models;

use App\Domain\Complaints\Models\Complaint;
use App\Domain\Feeds\Models\Feed;
use App\Models\Model;
use App\Models\User;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;

class Video extends Model implements HasMedia
{
    use InteractsWithMedia;


    public function complaints()
    {
        return $this->morphMany(Complaint::class, 'complaintable');
    }

    public function feed()
    {
        return $this->morphOne(Feed::class, 'feedable');
    }
    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
