6
0
Fork 0
jiqu-library-server/database/migrations/2021_12_13_115406_create_me...

39 lines
1.2 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMessagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('messages', function (Blueprint $table) {
$table->id();
$table->string('title')->comment('消息标题');
$table->text('content')->comment('消息内容');
$table->unsignedTinyInteger('type')->default(0)->comment('消息类型0公告1订单确认');
$table->unsignedBigInteger('user_id')->default(0)->comment('指定用户');
$table->json('ext')->nullable()->comment('消息扩展内容');
$table->tinyInteger('jump_type')->default(0)->comment('跳转类型0不跳转1跳转应用内页2H5链接');
$table->string('jump_link')->nullable()->comment('跳转地址');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('messages');
}
}