feat: add withdraw request functionality and UI components

This commit is contained in:
2026-08-27 02:39:57 +03:30
parent aeef95339d
commit 4ce663c669
115 changed files with 4064 additions and 315 deletions
+56
View File
@@ -0,0 +1,56 @@
<?php
namespace App\Models;
use App\Enums\WalletTransactionReasonEnum;
use App\Enums\WalletTransactionTypeEnum;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class WalletTransaction extends Model
{
use HasFactory;
protected $fillable = [
'type',
'reason',
'amount',
'balance_after',
'description',
'wallet_id',
'invoice_id',
'payment_id',
'withdraw_request_id',
];
protected $casts = [
'type' => WalletTransactionTypeEnum::class,
'reason' => WalletTransactionReasonEnum::class,
'amount' => 'integer',
'balance_after' => 'integer',
'wallet_id' => 'integer',
'invoice_id' => 'integer',
'payment_id' => 'integer',
'withdraw_request_id' => 'integer',
];
public function wallet()
{
return $this->belongsTo(Wallet::class);
}
public function invoice()
{
return $this->belongsTo(Invoice::class);
}
public function payment()
{
return $this->belongsTo(Payment::class);
}
public function withdrawRequest()
{
return $this->belongsTo(WithdrawRequest::class);
}
}