feat: Implement order and invoice management, enhance addon features, and remove the 'Type' module.

This commit is contained in:
pbao9
2026-02-11 17:02:07 +07:00
parent 58a9aa685b
commit 556b2c02e6
47 changed files with 1367 additions and 497 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CartAddon extends Model
{
use HasFactory;
protected $table = 'cart_addons';
protected $fillable = [
'cart_id',
'addon_id',
'qty',
'price',
];
/**
* Relationship: CartAddon belongs to Cart
*/
public function cart()
{
return $this->belongsTo(Cart::class, 'cart_id');
}
/**
* Relationship: CartAddon belongs to Addon
*/
public function addon()
{
return $this->belongsTo(Addon::class, 'addon_id');
}
}