<?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::dropIfExists('activity_user');
        Schema::create('activity_user', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->id();
            $table->integer('activity_id')->comment('活动ID');
            $table->string('title', 150)->comment('活动名称');
            $table->string('sub_title', 150)->comment('副标题');
            $table->integer('start_time')->comment('开始时间');
            $table->integer('end_time')->comment('结束时间');
            $table->string('detail_image')->comment('活动详情图片');
            $table->integer('part_in_time')->comment('参与时间');
            $table->string('member_id')->comment('会员ID');
            $table->tinyInteger('status')->default(0)->comment('0互动进行中，1活动结束');
            $table->timestamps();
        });



    }

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