<?php
 namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class AffiliatePayout extends Model { use HasFactory; protected $fillable = [ 'affiliate_id', 'amount', 'status', 'method', 'payment_method', 'notes', 'admin_id', 'transaction_reference', 'paid_at', ]; protected $casts = [ 'amount' => 'decimal:2', 'paid_at' => 'datetime', ]; public function affiliate() { return $this->belongsTo(Affiliate::class); } public function admin() { return $this->belongsTo(Admin::class); } } 