<?php

namespace App\Models;

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

class EventPaymentMethod extends Model
{
    protected $fillable = [
        'event_id',
        'manual_payment_method_id',
        'instructions_override',
        'is_active',
    ];

    protected function casts(): array
    {
        return [
            'is_active' => 'boolean',
        ];
    }

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

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