<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Payout extends BaseModel
{
    public $timestamps = false;

    protected function casts(): array
    {
        return [
            'amount' => 'decimal:2', 'processor_fee' => 'decimal:2',
            'requested_at' => 'datetime', 'processed_at' => 'datetime',
            'completed_at' => 'datetime', 'failed_at' => 'datetime',
        ];
    }

    public function partner(): BelongsTo { return $this->belongsTo(Partner::class); }
}