<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('play_types', function (Blueprint $table) {
            $table->id();
            $table->string('play_code', 32)->unique();
            $table->string('category', 16);
            $table->unsignedTinyInteger('dimension')->nullable()->comment('2/3/4');
            $table->string('bet_mode', 32)->nullable();
            $table->string('display_name_zh', 64)->nullable();
            $table->string('display_name_en', 64)->nullable();
            $table->string('display_name_ne', 64)->nullable();
            $table->boolean('is_enabled')->default(true);
            $table->integer('sort_order')->default(0);
            $table->boolean('supports_multi_number')->default(false);
            $table->json('reserved_rule_json')->nullable();
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('play_types');
    }
};
