|
@@ -0,0 +1,71 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
+
|
|
|
+class CreateConfigMessage extends Migration
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * Run the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function up()
|
|
|
+ {
|
|
|
+ Schema::create('config_message', function (Blueprint $table) {
|
|
|
+ $table->bigIncrements('id');
|
|
|
+
|
|
|
+ $table->string('title', 32)
|
|
|
+ ->comment('活动标题');
|
|
|
+
|
|
|
+ $table->tinyInteger('notice_groups')
|
|
|
+ ->default(0)
|
|
|
+ ->comment('通知群体:0:全部;1:原始用户;2.正式用户');
|
|
|
+
|
|
|
+ $table->string('message_type', 16)
|
|
|
+ ->default('system')
|
|
|
+ ->comment('消息类型:star星球活动消息;system系统通知消息');
|
|
|
+
|
|
|
+ $table->string('show_type', 16)
|
|
|
+ ->default('only_show')
|
|
|
+ ->comment('展示类型:only_show纯展示;user用户;post内容;activity活动;topic话题');
|
|
|
+
|
|
|
+ $table->string('activity_url', 255)
|
|
|
+ ->default('')
|
|
|
+ ->comment('活动链接');
|
|
|
+
|
|
|
+ $table->string('cover', 255)
|
|
|
+ ->default('')
|
|
|
+ ->comment('封面图');
|
|
|
+
|
|
|
+ $table->tinyInteger('status')
|
|
|
+ ->default(0)
|
|
|
+ ->comment('消息状态:0:未发送;1.已发送未隐藏2.已发送并隐藏');
|
|
|
+
|
|
|
+ $table->dateTime('send_time')
|
|
|
+ ->nullable()
|
|
|
+ ->comment('发送时间');
|
|
|
+
|
|
|
+ $table->integer('sent_count')
|
|
|
+ ->default(0)
|
|
|
+ ->comment('已发送数量');
|
|
|
+
|
|
|
+ $table->integer('open_count')
|
|
|
+ ->default(0)
|
|
|
+ ->comment('打开数量');
|
|
|
+
|
|
|
+ $table->timestamps();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Reverse the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function down()
|
|
|
+ {
|
|
|
+ Schema::dropIfExists('config_message');
|
|
|
+ }
|
|
|
+}
|