2025_07_11_152630_create_ticket_dings_table.php
1.2 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
38
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTicketDingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('gl_ticket_dings', function (Blueprint $table) {
$table->id();
$table->json('userIds')->comment('接收人ID列表');
$table->string('msgKey')->default('sampleMarkdown')->comment('消息模板标识');
$table->json('msgParam')->comment('消息内容参数,JSON格式');
$table->smallInteger('status')->default(0)->index()->comment('发送状态:0-未发送,1-已发送,2-发送失败');
$table->string('errorMsg')->nullable()->comment('错误信息,发送失败时记录');
$table->string('table_name', 50)->nullable()->comment('关联表名称');
$table->string('table_id', 50)->nullable()->comment('关联表ID');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('gl_ticket_dings');
}
}