<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class BlacklistRecord extends Model
{
    protected $fillable = ['customer_id','type','reason','notes','supporting_document_path','added_by','status','resolved_at','resolved_by'];
    protected function casts(): array { return ['resolved_at'=>'datetime']; }
    public function customer(): BelongsTo { return $this->belongsTo(Customer::class); }
    public function author(): BelongsTo { return $this->belongsTo(User::class, 'added_by'); }
    public function resolver(): BelongsTo { return $this->belongsTo(User::class, 'resolved_by'); }
}
