<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Commune extends Model
{
    //use HasUuids;
    use HasFactory;
    protected $fillable = ['libellear', 'libellefr', 'moughataa_id'];

    public function moughataa(): BelongsTo
    {
        return $this->belongsTo(Moughataa::class);
    }
    public function etablissements(): HasMany
    {
        return $this->hasMany(Etablissement::class);
    }
}

