37 lines
680 B
PHP
37 lines
680 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class WalletTransaction extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'wallet_id',
|
|
'booking_id',
|
|
'type',
|
|
'amount',
|
|
'description',
|
|
'status'
|
|
];
|
|
|
|
protected $casts = [
|
|
'id' => 'integer',
|
|
'wallet_id' => 'integer',
|
|
'booking_id' => 'integer',
|
|
'amount' => 'float'
|
|
];
|
|
|
|
public function wallet()
|
|
{
|
|
return $this->belongsTo(Wallet::class);
|
|
}
|
|
|
|
public function booking()
|
|
{
|
|
return $this->belongsTo(Booking::class);
|
|
}
|
|
}
|