<?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('notice_center_log', function (Blueprint $table) {
            $table->id();
            $table->integer("user_id")->nullable()->comment("用户id");
            $table->string("address")->nullable()->comment("发送目标地址");
            $table->text("content")->nullable()->comment("发送内容");
            $table->tinyInteger("status")->default(0)->comment("发送状态 0:未发送 1:已发送");
            $table->tinyInteger("plat")->default(0)->comment("发送平台 0:未知 1:公众号模板消息 2:小程序订阅消息 3:短信通知 4:企业微信消息 5:网易云信通知");
            $table->string("source")->nullable()->comment("来源 使用字符串标识");
            $table->timestamps();
        });
    }

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