first
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?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('prizes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('kod_hadiah')->nullable()->index();
|
||||
$table->string('nama_hadiah');
|
||||
$table->string('kategori')->nullable();
|
||||
$table->decimal('nilai_anggaran', 12, 2)->nullable();
|
||||
$table->unsignedInteger('draw_order')->default(0)->index();
|
||||
$table->unsignedInteger('item_index')->default(1); // #1, #2 ... bagi kuantiti > 1
|
||||
$table->string('batch_kod')->nullable()->index(); // kumpulkan item dari satu baris import
|
||||
// belum_dicabut, sedang_dicabut, disahkan, redraw_required
|
||||
$table->string('status')->default('belum_dicabut')->index();
|
||||
$table->unsignedInteger('redraw_count')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('prizes');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user