<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;

class Location extends Model
{
    use HasUuids;

    /**
     * @var list<string>
     */
    protected $fillable = [
        'nome',
        'endereco',
        'cidade',
        'latitude',
        'longitude',
        'ativo',
    ];

    /**
     * @return array<string, string>
     */
    protected function casts(): array
    {
        return [
            'latitude' => 'decimal:7',
            'longitude' => 'decimal:7',
            'ativo' => 'boolean',
        ];
    }
}
