added zarin

This commit is contained in:
2026-07-23 20:24:58 +03:30
parent d8b685524b
commit 8a4a406e66
17 changed files with 2007 additions and 10 deletions
+1
View File
@@ -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).
+48
View File
@@ -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');
}
}