<?php

namespace App\Models;

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

class ImportMapFile extends Model
{
    protected $fillable = [
        'map_id',
        'file_name',
        'file_modified_at',
        'imported_at',
    ];

    protected $casts = [
        'file_modified_at' => 'datetime',
        'imported_at' => 'datetime',
    ];

    public function importMap(): BelongsTo
    {
        return $this->belongsTo(ImportMap::class, 'map_id');
    }
}
