2019_06_04_060233_create_message_rule.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateMessageRule extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('message_rule', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('title', 32)
  17. ->comment('活动标题');
  18. $table->string('notice_groups', 32)
  19. ->default(0)
  20. ->comment('通知群体:0:全部;1:原始用户;2.正式用户');
  21. $table->string('message_type', 16)
  22. ->default('system')
  23. ->comment('消息类型:star后院活动消息;system系统通知消息');
  24. $table->string('show_type', 16)
  25. ->default('only_show')
  26. ->comment('展示类型:only_show纯展示;user用户;post内容;activity活动;topic话题');
  27. $table->string('activity_url', 255)
  28. ->default('')
  29. ->comment('活动链接');
  30. $table->string('cover', 255)
  31. ->default('')
  32. ->comment('封面图');
  33. $table->tinyInteger('status')
  34. ->default(0)
  35. ->comment('消息状态:0:未发送;1.已发送未隐藏2.已发送并隐藏');
  36. $table->dateTime('send_time')
  37. ->nullable()
  38. ->comment('发送时间');
  39. $table->integer('sent_count')
  40. ->default(0)
  41. ->comment('已发送数量');
  42. $table->integer('open_count')
  43. ->default(0)
  44. ->comment('打开数量');
  45. $table->timestamps();
  46. });
  47. }
  48. /**
  49. * Reverse the migrations.
  50. *
  51. * @return void
  52. */
  53. public function down()
  54. {
  55. Schema::dropIfExists('config_message');
  56. }
  57. }