@@ -24,18 +24,18 @@ |
||
24 | 24 | } |
25 | 25 | // https://segmentfault.com/q/1010000000672529/a-1020000000679702 |
26 | 26 | $this->createTable($this->tableName, [ |
27 | - 'id' => $this->bigPrimaryKey()->unsigned()->comment('Id'),//通知ID |
|
28 | - 'verb' => $this->string(32)->comment('Verb'),//活动图片 |
|
29 | - 'template' => $this->string()->comment('Template'),//通知类型 |
|
30 | - 'is_read' => $this->boolean()->defaultValue(false)->comment('Read'),//是否已读 |
|
31 | - 'is_pending' => $this->boolean()->defaultValue(false)->comment('Pending'),//是否已经推送 |
|
32 | - 'sender_id' => $this->integer()->unsigned()->comment('Sender Id'),//发送者ID |
|
33 | - 'sender_class' => $this->string()->comment('Sender Class'),//发送者模型 |
|
34 | - 'receiver' => $this->string()->comment('Receiver'),//接收器 |
|
35 | - 'publish_at' => $this->integer()->unsigned()->notNull()->comment('Publish At'),//发送时间 |
|
36 | - 'entity_id' => $this->unsignedInteger()->comment('Entity'),//任务对象 |
|
37 | - 'source_id' => $this->unsignedInteger()->comment('Source'),//原有任务对象 |
|
38 | - 'target_id' => $this->unsignedInteger()->comment('Target'),//目标对象 |
|
27 | + 'id' => $this->bigPrimaryKey()->unsigned()->comment('Id'), //通知ID |
|
28 | + 'verb' => $this->string(32)->comment('Verb'), //活动图片 |
|
29 | + 'template' => $this->string()->comment('Template'), //通知类型 |
|
30 | + 'is_read' => $this->boolean()->defaultValue(false)->comment('Read'), //是否已读 |
|
31 | + 'is_pending' => $this->boolean()->defaultValue(false)->comment('Pending'), //是否已经推送 |
|
32 | + 'sender_id' => $this->integer()->unsigned()->comment('Sender Id'), //发送者ID |
|
33 | + 'sender_class' => $this->string()->comment('Sender Class'), //发送者模型 |
|
34 | + 'receiver' => $this->string()->comment('Receiver'), //接收器 |
|
35 | + 'publish_at' => $this->integer()->unsigned()->notNull()->comment('Publish At'), //发送时间 |
|
36 | + 'entity_id' => $this->unsignedInteger()->comment('Entity'), //任务对象 |
|
37 | + 'source_id' => $this->unsignedInteger()->comment('Source'), //原有任务对象 |
|
38 | + 'target_id' => $this->unsignedInteger()->comment('Target'), //目标对象 |
|
39 | 39 | ], $tableOptions); |
40 | 40 | |
41 | 41 | $this->createIndex('notification_index', $this->tableName, ['sender_id', 'sender_class']); |