<?php

declare(strict_types=1);

namespace App\Models;

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

class TicketCustomFieldValue extends Model
{
    protected $fillable = [
        'ticket_id',
        'custom_field_id',
        'value',
    ];

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

    public function customField(): BelongsTo
    {
        return $this->belongsTo(TicketCustomField::class, 'custom_field_id');
    }
}
