<?php

namespace App\Models;

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

class Lectura extends Model
{
    use HasFactory;

    protected $fillable = [
        'titulo',
        'contenido',
        'nivel',
        'grado_sugerido',
        'cantidad_palabras',
        'estado',
    ];

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

    public function preguntas()
    {
        return $this->hasMany(Pregunta::class);
    }
}
