<?php

namespace App\Models;

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

class Pays extends Model
{
    use HasFactory;

    protected $fillable = [
        'nom', 'code_iso', 'indicatif_tel', 'actif',
    ];

    protected $casts = [
        'actif' => 'boolean',
    ];

    // Relations
    public function villes(): \Illuminate\Database\Eloquent\Relations\HasMany
    {
        return $this->hasMany(Ville::class);
    }
}
