38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
<?php
|
||
|
||
use Illuminate\Support\Facades\Schema;
|
||
use Illuminate\Database\Schema\Blueprint;
|
||
use Illuminate\Database\Migrations\Migration;
|
||
|
||
class CreateNotices extends Migration
|
||
{
|
||
/**
|
||
* Run the migrations.
|
||
*
|
||
* @return void
|
||
*/
|
||
public function up()
|
||
{
|
||
Schema::create('notices', function (Blueprint $table) {
|
||
$table->increments('id');
|
||
$table->integer('user_id')->comment('用户id');
|
||
$table->integer('send_user_id')->nullable()->comment('发信用户id');
|
||
$table->string('type',50)->nullable()->comment('信息类型');
|
||
$table->string('content')->nullable()->comment('内容');
|
||
$table->tinyInteger('status')->default(0)->comment('是否查看,0:未查看 1:已查看');
|
||
$table->timestamps();
|
||
$table->timestamp('deleted_at')->nullable();
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Reverse the migrations.
|
||
*
|
||
* @return void
|
||
*/
|
||
public function down()
|
||
{
|
||
Schema::dropIfExists('notices');
|
||
}
|
||
}
|