<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class TicketMessage extends Model
{
    protected $fillable = ['ticket_id', 'sender_id', 'is_admin', 'message', 'attachments'];
    protected $casts = ['is_admin' => 'boolean', 'attachments' => 'array'];

    public function ticket() { return $this->belongsTo(SupportTicket::class); }
}
