| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- /**
- * Class CreateImGroupsTable.
- */
- class CreateImGroupsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('im_groups', function(Blueprint $table) {
- $table->increments('id');
- $table->integer('m_id')->default(0)->index('m_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->integer('handle_id')->index('handle_id')->comment('处理该组消息(即接收)人ID');
- $table->tinyInteger('group_type')->comment('消息组关系类型 1:用户与用户,2:用户与店铺,3:用户与平台');
- $table->string('logo')->comment('接收人logo');
- $table->string('name')->comment('接收人昵称');
- $table->tinyInteger('text_type')->comment('最后一条消息内容类型 1:文字,2:图片');
- $table->string('text')->comment('最后一条消息内容');
- $table->timestamp('last_time')->comment('最后一条消息时间');
- $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_groups');
- }
- }
|