2022_12_26_160224_create_pushes_table.php 1.07 KB
<?php

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

class CreatePushesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('pushes', function (Blueprint $table) {
            $table->id();
            $table->string('title')->comment('标题');
            $table->unsignedTinyInteger('terminal')->comment('1=Android,2=IOS');
            $table->unsignedTinyInteger('push_type')->comment('1=立即,2=定时');
            $table->timestamp('push_time')->comment('推送时间');
            $table->string('action_type')->comment('动作类型');
            $table->unsignedTinyInteger('user_type')->comment('目标人群1=所有人,2=指定用户');
            $table->string('user_id')->comment('用户id');
            $table->timestamps();
        });
    }

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