added kashkool

This commit is contained in:
2026-06-11 22:08:47 +03:30
parent 779a67a23e
commit 2d177ad581
24 changed files with 1575 additions and 3 deletions
+37
View File
@@ -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');
}
}