2024_11_14_034951_create_coach_users_table.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('coach_users', function (Blueprint $table) {
  15. $table->comment('技师');
  16. $table->increments('id');
  17. $table->unsignedBigInteger('user_id')->comment('用户编号');
  18. $table->unsignedBigInteger('info_record_id')->nullable()->comment('技师信息记录编号');
  19. $table->unsignedBigInteger('real_auth_record_id')->nullable()->comment('技师实名认证记录编号');
  20. $table->unsignedBigInteger('qualification_record_id')->nullable()->comment('技师资质认证记录编号');
  21. $table->unsignedBigInteger('shop_id')->nullable()->comment('店铺编号');
  22. $table->string('level')->nullable()->comment('技师等级');
  23. $table->integer('virtual_order')->default(new \Illuminate\Database\Query\Expression('0'))->nullable()->comment('虚拟订单数');
  24. $table->decimal('score')->default(new \Illuminate\Database\Query\Expression('5.0'))->nullable()->comment('评分');
  25. $table->string('work_status')->default('REST')->comment('工作状态');
  26. $table->string('virtual_status')->default('DISABLE')->comment('虚拟状态');
  27. $table->string('state')->default('ENABLE')->comment('状态');
  28. $table->timestamps();
  29. $table->softDeletes();
  30. });
  31. }
  32. /**
  33. * Reverse the migrations.
  34. *
  35. * @return void
  36. */
  37. public function down()
  38. {
  39. Schema::dropIfExists('coach_users');
  40. }
  41. };