36 lines
898 B
PHP
36 lines
898 B
PHP
<?php
|
||
|
||
use Illuminate\Database\Migrations\Migration;
|
||
use Illuminate\Database\Schema\Blueprint;
|
||
use Illuminate\Support\Facades\Schema;
|
||
|
||
class CreateNoticesTable extends Migration
|
||
{
|
||
/**
|
||
* Run the migrations.
|
||
*
|
||
* @return void
|
||
*/
|
||
public function up()
|
||
{
|
||
Schema::create('notices', function (Blueprint $table) {
|
||
$table->id();
|
||
$table->integer('notice_id')->unique()->comment('通知id');
|
||
$table->integer('notice_type')->comment('通知type');
|
||
$table->text('raw_content')->comment('原始消息内容');
|
||
$table->tinyInteger('state')->default(1)->comment('消息状态,1待消费,3处理完成');
|
||
$table->timestamps();
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Reverse the migrations.
|
||
*
|
||
* @return void
|
||
*/
|
||
public function down()
|
||
{
|
||
Schema::dropIfExists('notices');
|
||
}
|
||
}
|