2021_11_11_174225_create_im_services_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. /**
  5. * Class CreateImServicesTable.
  6. */
  7. class CreateImServicesTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('im_services', function(Blueprint $table) {
  17. $table->increments('id');
  18. $table->integer('m_id')->index('m_id')->comment('客服绑定的会员ID');
  19. $table->string('nickname')->comment('客服昵称');
  20. $table->string('head_img')->comment('客服头像');
  21. $table->string('account')->index('account')->comment('客服账号');
  22. $table->char('password',32)->comment('账号密码');
  23. $table->char('encrypt',6)->comment('加密字符串');
  24. $table->tinyInteger('status')->default(1)->index('status')->comment('客服状态 1:在线,2:下线');
  25. $table->tinyInteger('is_del')->default(0)->index('is_del')->comment('是否删除 0:否,1:是');
  26. $table->timestamps();
  27. });
  28. }
  29. /**
  30. * Reverse the migrations.
  31. *
  32. * @return void
  33. */
  34. public function down()
  35. {
  36. Schema::drop('im_services');
  37. }
  38. }