<?php

namespace App\Models;

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

class ReconImportTemplate extends Model
{
    protected $fillable = [
        'channel',
        'name',
        'header_row',
        'column_map',
        'status_exclude_values',
        'created_by',
    ];

    protected $casts = [
        'column_map'            => 'array',
        'status_exclude_values' => 'array',
    ];

    public function createdBy(): BelongsTo
    {
        return $this->belongsTo(User::class, 'created_by');
    }
}
