<?php

namespace App\Models;

class BankStatementImport extends BaseModel
{
    protected $fillable = [
        'company_id',
        'bank_reconciliation_id',
        'original_filename',
        'row_count',
        'imported_by',
    ];

    public function reconciliation()
    {
        return $this->belongsTo(BankReconciliation::class, 'bank_reconciliation_id');
    }

    public function lines()
    {
        return $this->hasMany(BankStatementLine::class);
    }

    public function importedByUser()
    {
        return $this->belongsTo(User::class, 'imported_by');
    }
}
