<?php
namespace App\Models;
use App\Models\Concerns\BelongsToMerchant;
use Illuminate\Database\Eloquent\Model;
final class SettlementBatch extends Model { use BelongsToMerchant; protected $fillable=['public_id','merchant_id','asset_id','payout_wallet_id','payout_id','environment','status','amount_atomic','fee_atomic','failure_reason','approved_at','completed_at','metadata']; protected function casts():array{return ['approved_at'=>'datetime','completed_at'=>'datetime','metadata'=>'array'];} public function merchant(){return $this->belongsTo(Merchant::class);} public function asset(){return $this->belongsTo(Asset::class);} public function payoutWallet(){return $this->belongsTo(PayoutAddressAllowlist::class,'payout_wallet_id');} public function payout(){return $this->belongsTo(Payout::class);} }