<?php

namespace App\Entities;

use CodeIgniter\Entity\Entity;

class Local extends Entity
{
    protected $casts = [
        'id_local' => 'integer',
        'estado'   => 'integer',
    ];

    public function estaActivo(): bool
    {
        return isset($this->attributes['estado']) && (int)$this->attributes['estado'] === 1;
    }
}
