added kashkool
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Cart extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'cart';
|
||||
protected $fillable = [
|
||||
'customer_id',
|
||||
'sts',
|
||||
'session_id',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
static $STS = [
|
||||
1=>'در انتظار ثبت',
|
||||
2=>'در انتظار پرداخت',
|
||||
3=>'پرداخت شده',
|
||||
4=>'لغو شده',
|
||||
];
|
||||
|
||||
public function items()
|
||||
{
|
||||
return $this->hasMany(CartItem::class, 'cart_id');
|
||||
}
|
||||
|
||||
protected function serializeDate(\DateTimeInterface $date)
|
||||
{
|
||||
return $date->format('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user