main
This commit is contained in:
Executable
+56
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Tahesab extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tahesab';
|
||||
|
||||
protected $fillable = [
|
||||
'customer_id',
|
||||
'amount',
|
||||
'desc',
|
||||
'order_id',
|
||||
'date',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'sh_factor',
|
||||
'tahesab_id',
|
||||
'res',
|
||||
'factor_number',
|
||||
'tah_id',
|
||||
|
||||
];
|
||||
|
||||
|
||||
static $STS = [
|
||||
1 => 'باز',
|
||||
2 => 'موفق',
|
||||
3 => 'ناموفق'
|
||||
];
|
||||
|
||||
static $DIRECTION = [
|
||||
1 => 'خرید',
|
||||
2 => 'فروش'
|
||||
];
|
||||
|
||||
static $PAYMENT_STS=[
|
||||
1 => 'در انتظار پرداخت',
|
||||
2 => 'در حال پرداخت',
|
||||
3 => 'partially_paid',
|
||||
4 => 'پرداخت شده',
|
||||
5 => 'partially_refunded',
|
||||
6 => 'مرجوعی',
|
||||
7 => 'پرداخت نشده',
|
||||
];
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class, 'customer_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user