love_php/database/migrations/2018_06_13_152734_create_notices.php
2026-04-02 09:20:51 +08:00

38 lines
1.0 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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');
}
}