2018_10_23_101827_create_pms_table.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreatePmsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('pms', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->tinyInteger('msgtype')->comment('消息类型(1:站内信 2:普通消息)');
  17. $table->integer('msgfromuid')->index()->comment('消息来源uid');
  18. $table->string('msgfrom')->comment('消息来源');
  19. $table->string('msgtoname')->comment('对方用户名');
  20. $table->integer('msgtouid')->index()->comment('对方会员uid');
  21. $table->string('message')->comment('消息内容');
  22. $table->tinyInteger('new')->default('1')->comment('查看状态 1:未查看,2已查看))')->nullable();
  23. $table->string('reply')->comment('回复内容')->nullable();
  24. $table->integer('replytime')->comment('回复时间')->nullable();
  25. $table->integer('replyuid')->comment('回复uid')->nullable();
  26. $table->timestamps();
  27. $table->softDeletes();
  28. });
  29. }
  30. /**
  31. * Reverse the migrations.
  32. *
  33. * @return void
  34. */
  35. public function down()
  36. {
  37. Schema::dropIfExists('pms');
  38. }
  39. }