<?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('activity_rewards', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->id();
            $table->string('title', 150)->comment('活动名称');
            $table->decimal('gift_amount', 10, 2)->comment('赠送金额');
            $table->decimal('flow_amount', 10, 2)->comment('打码量');
            $table->integer('participant_count')->default(0)->comment('已参与人数');
            $table->integer('activity_total')->comment('活动总数量;-1表示不限量');
            $table->integer('maximum_participation')->comment('每人最多可参与次数;0表示不限制');
            $table->integer('start_time')->comment('开始时间');
            $table->integer('end_time')->comment('结束时间');


            $table->timestamps();
        });
    }

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