2023_03_02_214554_create_feedback_table.php
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFeedbackTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('feedback', function (Blueprint $table) {
$table->id();
$table->unsignedInteger("from_user_id")->comment("发起用户");
$table->unsignedInteger("to_user_id")->default(1)->comment("接收用户");
$table->unsignedTinyInteger("type")->comment("消息类型");
$table->text("content")->comment("内容");
$table->unsignedTinyInteger("is_from_user")->comment("发起者");
$table->unsignedTinyInteger("state")->comment("0=未读1=已读");
$table->timestamp('send_time', 0)->nullable()->comment("发送时间");
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('feedback');
}
}