<?php

namespace App\Entities;

use CodeIgniter\Entity\Entity;

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

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