<?php

namespace App\Models;

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

class Land extends Model
{
    use HasFactory;
    use SoftDeletes;

    protected $guarded = [];

    protected $fillable = ['name', 'address', 'phone'];

    public function monyImports()
    {
        return $this->belongsToMany(MonyImport::class);
    }

    public function monyExports()
    {
        return $this->belongsToMany(MonyExport::class);
    }

    public function sales()
    {
        return $this->belongsToMany(Sale::class);
    }

    public function purchases()
    {
        return $this->belongsToMany(Purchase::class);
    }

    public function equipWorks()
    {
        return $this->belongsToMany(EquipWork::class);
    }

    public function attendances()
    {
        return $this->belongsToMany(Attendance::class);
    }

}
