<?php

namespace App\Models;

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

class TicketReply extends Model
{
    use HasFactory;

    protected $guarded = [];

    // Relasi: Balasan ini milik tiket yang mana?
    public function ticket()
    {
        return $this->belongsTo(Ticket::class);
    }

    // Relasi: Balasan ini ditulis oleh user yang mana? (Bisa null jika Guest)
    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
