<?php

namespace App\Models;

use App\Models\Dashboard\Admin\Admin;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class Amenity extends Model
{
    use HasFactory;

    protected $fillable = ['name'];
    public $table = 'amenities';

    public function properties()
    {
        return $this->belongsToMany(Property::class, 'property_amenity');
    }

    
    public function admin()
    {
        return $this->belongsTo(Admin::class);
    }
}
