<?php

namespace App\Models\Juil;

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

class MeetingMinuteSegment extends Model
{
    protected $table = 'meeting_minute_segments';

    protected $fillable = [
        'meeting_minute_id',
        'segment_order',
        'speaker_name',
        'speaker_label',
        'text',
        'start_time_ms',
        'end_time_ms',
        'is_manual_speaker',
    ];

    protected $casts = [
        'segment_order' => 'integer',
        'start_time_ms' => 'integer',
        'end_time_ms' => 'integer',
        'is_manual_speaker' => 'boolean',
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
    ];

    public function meetingMinute(): BelongsTo
    {
        return $this->belongsTo(MeetingMinute::class);
    }
}
