<?php

// app/Models/Neighborhood.php

namespace App\Models;

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

class Neighborhood extends Model
{
    use HasFactory;

    protected $fillable = ['municipality_id', 'name', 'code'];

    public function municipality()
    {
        return $this->belongsTo(Municipality::class);
    }

    public function markets()
    {
        return $this->hasMany(Market::class);
    }
}
