<?php

declare(strict_types=1);

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

final class LessonType extends Model
{
    protected $table = 'lesson_types';
    protected $fillable = [
        'tenant_id', 'name', 'color', 'default_duration', 'category',
        'requirement_key', 'is_billable', 'is_counted', 'is_rest_relevant',
        'fixed_duration', 'sort_order', 'system_key',
    ];
    protected $casts = [
        'is_billable' => 'integer', 'is_counted' => 'integer',
        'is_rest_relevant' => 'integer', 'fixed_duration' => 'integer',
    ];

    public function tenant(): BelongsTo
    {
        return $this->belongsTo(Tenant::class, 'tenant_id');
    }
}