<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ManualPaymentSubmission extends Model
{
    protected $fillable = [
        'invoice_id', 'user_id', 'payment_method', 'payment_channel', 'proof_path', 'original_filename',
        'mime_type', 'file_size', 'status', 'client_note', 'admin_note', 'reviewed_by',
        'reviewed_at', 'transaction_id',
    ];

    protected $casts = ['reviewed_at' => 'datetime'];

    public function invoice() { return $this->belongsTo(Invoice::class); }
    public function user() { return $this->belongsTo(User::class); }
    public function reviewer() { return $this->belongsTo(User::class, 'reviewed_by'); }
}
