<?php

namespace App\Models;

use App\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;

class SalaryPaymentBatch extends Model
{
    use BelongsToTenant;

    protected $fillable = ['tenant_id', 'payroll_run_id', 'batch_number', 'format', 'status', 'file_path', 'submission_reference', 'response_notes', 'prepared_by', 'submitted_at', 'processed_at'];

    protected $casts = ['submitted_at' => 'datetime', 'processed_at' => 'datetime'];

    public function payrollRun()
    {
        return $this->belongsTo(PayrollRun::class);
    }
}
