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
+15 -16
View File
@@ -2,47 +2,46 @@
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\Addon;
class AddonSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
public function run(): void
{
$productAddon = [
$addons = [
[
'code' => 'cpu',
'name' => 'CPU',
'price' => 100000,
'type_id' => 1,
'min' => 0,
'max' => 30,
'step' => 1,
'prefix' => 'vCore'
'prefix' => 'vCore',
'status' => true,
],
[
'code' => 'ram',
'name' => 'RAM',
'price' => 50000,
'type_id' => 1,
'min' => 0,
'max' => 32,
'step' => 1,
'prefix' => 'GB'
'prefix' => 'GB',
'status' => true,
],
[
'code' => 'disk',
'name' => 'SSD',
'price' => 4000,
'type_id' => 1,
'min' => 0,
'max' => 1500,
'step' => 10,
'prefix' => 'GB'
]
'prefix' => 'GB',
'status' => true,
],
];
\App\Models\Addon::insert($productAddon);
Addon::upsert($addons, ['code']);
}
}