<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Currency extends Model
{
    use HasFactory;

    protected $guarded = [];

    public function engineers()
    {
        return $this->morphedByMany(Engineer::class, 'currenciable');
    }

    public function firms()
    {
        return $this->morphedByMany(Firm::class, 'currenciable');
    }

    public function services()
    {
        return $this->morphedByMany(Service::class, 'currenciable');
    }

    public function projects()
    {
        return $this->morphedByMany(Project::class, 'currenciable');
    }
}
