<?php

namespace App\Domain\Images\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 Image extends Model implements HasMedia
{
    use InteractsWithMedia;

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

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

    public function user()
    {
        return $this->belongsTo(User::class);
    }


}
