feat: shayegan inbound charges workflow and copper kilogram unit enforcement
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ShayeganInboundCharge extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'shayegan_inbound_charges';
|
||||
|
||||
protected $fillable = [
|
||||
'customer_id',
|
||||
'customer_tafsil',
|
||||
'shayegan_number',
|
||||
'amount',
|
||||
'description',
|
||||
'source',
|
||||
'status',
|
||||
'raw_data',
|
||||
'approved_by',
|
||||
'approved_at',
|
||||
'rejected_by',
|
||||
'rejected_at',
|
||||
'reject_reason',
|
||||
'withdraw_id',
|
||||
'transaction_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'amount' => 'float',
|
||||
'approved_at' => 'datetime',
|
||||
'rejected_at' => 'datetime',
|
||||
'raw_data' => 'array',
|
||||
];
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class, 'customer_id');
|
||||
}
|
||||
|
||||
public function approver()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'approved_by');
|
||||
}
|
||||
|
||||
public function rejecter()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'rejected_by');
|
||||
}
|
||||
|
||||
public function withdraw()
|
||||
{
|
||||
return $this->belongsTo(Withdraw::class, 'withdraw_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user