added zarin
This commit is contained in:
@@ -360,6 +360,7 @@ class Product extends Model
|
||||
'amount', // The amount of the record.
|
||||
'unit', // The unit of the item.
|
||||
'group_type', // The unit of the item.
|
||||
'finance_p_name', // کد کار زرین (idKar)
|
||||
'file_id', // The ID of the associated file.
|
||||
'can_canceled', // Whether the record can be canceled (boolean).
|
||||
'active', // The active status of the record (boolean).
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Zarin extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'zarin';
|
||||
|
||||
protected $fillable = [
|
||||
'customer_id',
|
||||
'order_id',
|
||||
'withdraw_id',
|
||||
'amount',
|
||||
'desc',
|
||||
'type',
|
||||
'date',
|
||||
'zarin_id',
|
||||
'sh_factor',
|
||||
'factor_number',
|
||||
'data',
|
||||
'res',
|
||||
'sync_status',
|
||||
'sync_log',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
static $STS = [
|
||||
1 => 'باز',
|
||||
2 => 'موفق',
|
||||
3 => 'ناموفق'
|
||||
];
|
||||
|
||||
static $DIRECTION = [
|
||||
1 => 'خرید',
|
||||
2 => 'فروش'
|
||||
];
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class, 'customer_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user