<?php

namespace App\Models;

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

class ReportFilter extends Model
{
    protected $fillable = [
        'report_id',
        'key',
        'label',
        'type',
        'nullable',
        'default_value',
        'options',
        'data_source',
        'order',
    ];

    protected $casts = [
        'nullable' => 'boolean',
        'order' => 'integer',
        'options' => 'array',
    ];

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