2024_09_10_090033_create_coach_users_table.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. * Run the migrations.
  8. */
  9. public function up(): void
  10. {
  11. Schema::create('coach_users', function (Blueprint $table) {
  12. $table->id();
  13. $table->string('name')->nullable()->comment('技师姓名');
  14. $table->bigInteger('user_id');
  15. $table->string('mobile')->nullable()->comment('手机号');
  16. $table->string('avatar')->nullable()->comment('头像');
  17. $table->tinyInteger('status')->default(0)->comment('状态 (0正常 1停用)');
  18. $table->tinyInteger('sex')->default(0)->nullable()->comment('用户性别');
  19. $table->bigInteger('work_time')->nullable()->comment('从业年份');
  20. $table->string('city')->nullable()->comment('城市');
  21. $table->string('lng')->nullable();
  22. $table->string('lat')->nullable();
  23. $table->string('address')->nullable()->comment('详细地址');
  24. $table->string('brief')->nullable()->comment('简介');
  25. $table->string('id_code')->nullable()->comment('证件号');
  26. $table->string('id_card')->nullable()->comment('证件照片');
  27. $table->text('license')->nullable()->comment('执照');
  28. $table->string('work_img')->nullable()->comment('工作照');
  29. $table->string('self_img')->nullable()->comment('个人照');
  30. $table->tinyInteger('is_work')->default(1)->comment('是否工作');
  31. $table->integer('birthday')->nullable()->comment('出生日期');
  32. $table->integer('order_num')->default(0)->comment('虚拟订单量');
  33. $table->integer('total_order_num')->default(0)->comment('总订单量');
  34. $table->tinyInteger('is_recommend')->default(0)->comment('是否推荐');
  35. $table->integer('sort')->default(0)->comment('排序');
  36. $table->tinyInteger('auth_status')->default(0)->comment('认证状态');
  37. $table->string('alipay_number')->nullable()->comment('支付宝账号');
  38. $table->text('verify_text')->nullable()->comment('审核意见');
  39. $table->timestamp('verify_time')->nullable()->comment('审核时间');
  40. $table->text('auth_text')->nullable()->comment('认证意见');
  41. $table->timestamp('auth_time')->nullable()->comment('认证时间');
  42. $table->timestamps();
  43. $table->softDeletes();
  44. });
  45. }
  46. /**
  47. * Reverse the migrations.
  48. */
  49. public function down(): void
  50. {
  51. Schema::dropIfExists('coach_users');
  52. }
  53. };