<?php

namespace App\Models;

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

class Landmark extends Model
{
    use HasFactory;
    
    protected $table = 'landmarks';

    protected $fillable = ['name', 'type'];

    
    public function properties()
    {
        return $this->belongsToMany(Property::class, 'landmark_properties')
                    ->withPivot('distance')
                    ->withTimestamps();
    }

}
