| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- /**
- * Class CreateImMessagesTable.
- */
- class CreateImMessagesTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('im_messages', function(Blueprint $table) {
- $table->increments('id');
- $table->integer('group_id')->index('group_id')->comment('分组id');
- $table->integer('m_id')->index('m_id')->comment('发送人会员ID');
- $table->integer('handle_id')->index('handle_id')->comment('处理(接收)该条消息会员ID');
- $table->integer('shop_id')->default(0)->index('shop_id')->comment('店铺ID');
- $table->integer('service_id')->default(0)->index('service_id')->comment('客服ID');
- $table->tinyInteger('text_type')->comment('消息内容类型 1:文字,2:图片');
- $table->string('text')->comment('消息内容');
- $table->tinyInteger('status')->default(0)->index('status')->comment('消息状态 0:未读,1:已读');
- $table->tinyInteger('is_del')->default(0)->index('is_del')->comment('是否删除 0:否,1:是');
- $table->timestamps();
- $table->engine = 'InnoDB';
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('im_messages');
- }
- }
|