?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { public function up(): void { Schema::create('services', function (Blueprint $table) { $table->id(); $table->foreignId('category_id')->nullable()->constrained()->nullOnDelete()->index(); $table->string('name'); $table->string('slug')->unique(); $table->string('sku')->nullable(); $table->text('description')->nullable(); $table->string('short_description')->nullable(); $table->string('billing_model')->default('recurring')->index(); $table->decimal('price', 12, 4)->default(0); $table->decimal('setup_fee', 12, 4)->default(0); $table->string('currency', 3)->default('USD'); $table->json('capabilities')->nullable(); $table->unsignedInteger('included_tickets')->default(0); $table->unsignedInteger('included_hours')->default(0); $table->boolean('auto_renew')->default(true); $table->boolean('requires_engineer')->default(false); $table->boolean('requires_server')->default(false); $table->boolean('supports_addons')->default(false); $table->boolean('generates_reports')->default(false); $table->string('status')->default('active')->index(); $table->string('visibility')->default('public'); $table->timestamps(); $table->softDeletes(); }); } public function down(): void { Schema::dropIfExists('services'); } };