You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.2 KiB
44 lines
1.2 KiB
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration {
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('dialogues', function (Blueprint $table) {
|
|
$table->comment('会话列表');
|
|
$table->id();
|
|
// 用户id
|
|
$table->integer('user_id')->nullable()->comment('用户id');
|
|
// 接收人id
|
|
$table->integer('to_user_id')->nullable()->comment('接收人id');
|
|
// 需求id
|
|
$table->integer('supply_demand_id')->nullable()->comment('需求id');
|
|
// 消息内容
|
|
$table->text('last_content')->nullable()->comment('最后一条消息消息内容');
|
|
$table->text('last_datetime')->nullable()->comment('最后一条消息消息内容时间');
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::table('dialogues', function (Blueprint $table) {
|
|
//
|
|
});
|
|
}
|
|
};
|