<?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('talk', function (Blueprint $table) {
            $table->id();
            $table->string('title')->comment('话题标题');
            $table->text('images')->nullable()->comment('话题图片');
            $table->tinyInteger('status')->default(0)->comment('话题状态 0:激活 1:关闭');
            $table->tinyInteger('type')->default(0)->comment('类型 0:讨论 1:投票');
            $table->timestamps();
        });
    }

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