id(); $table->string('name', 50); $table->string('code', 20)->unique(); $table->text('terms_conditions')->nullable(); $table->enum('type', [VoucherType::values()])->default(VoucherType::PERCENTAGE)->comment(VoucherType::comment()); $table->unsignedInteger('discount_amount'); $table->unsignedInteger('min_purchase')->nullable(); $table->unsignedInteger('max_discount')->nullable(); $table->unsignedInteger('quota')->nullable(); $table->unsignedInteger('limit_per_user')->nullable(); $table->date('start_date'); $table->date('end_date')->nullable(); $table->enum('is_active', [IsActive::values()])->default(IsActive::ACTIVE)->comment(IsActive::comment()); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('vouchers'); } };