|null $bank_account * @property string|null $bank_response * @property array|null $gateway_payload * @property \Illuminate\Support\Carbon|null $completed_at * @property \Illuminate\Support\Carbon|null $failed_at * @property array|null $metadata * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $deleted_at * @property-read \Illuminate\Database\Eloquent\Collection $paymentSplits * @property-read int|null $payment_splits_count * @property-read \App\Models\Provider $provider * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal newQuery() * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal query() * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereBankAccount($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereBankResponse($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereCompletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereFailedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereGatewayFeeAmount($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereGatewayPayload($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereGrossAmount($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereIdempotencyKey($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereMetadata($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereNetAmount($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereProviderId($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereRecipientId($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereStatus($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereTransferId($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereType($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal withTrashed(bool $withTrashed = true) * @method static \Illuminate\Database\Eloquent\Builder|ProviderWithdrawal withoutTrashed() * @mixin \Eloquent */ class ProviderWithdrawal extends Model { use HasFactory, SoftDeletes; protected $table = 'provider_withdrawals'; protected $fillable = [ 'provider_id', 'recipient_id', 'transfer_id', 'idempotency_key', 'gross_amount', 'gateway_fee_amount', 'net_amount', 'status', 'type', 'bank_account', 'bank_response', 'gateway_payload', 'completed_at', 'failed_at', 'metadata', ]; protected function casts(): array { return [ 'gross_amount' => 'decimal:2', 'gateway_fee_amount' => 'decimal:2', 'net_amount' => 'decimal:2', 'status' => \App\Enums\ProviderWithdrawalStatusEnum::class, 'bank_account' => 'array', 'gateway_payload' => 'array', 'metadata' => 'array', 'completed_at' => 'datetime', 'failed_at' => 'datetime', ]; } public function provider(): BelongsTo { return $this->belongsTo(Provider::class); } public function paymentSplits(): HasMany { return $this->hasMany(PaymentSplit::class); } }