<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('lottery_awards', function (Blueprint $table) {
            $table->id();
            $table->integer('lottery_id')->unsigned()->comment("抽奖id");
            $table->string('name')->nullable()->comment("奖品名称");
            $table->string('pic')->nullable()->comment("奖品图片");
            $table->string('level')->nullable()->comment("等级");
            $table->tinyInteger('num')->default(1)->comment("中奖人数");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('lottery_awards');
    }
};
