2024_09_10_090033_create_coach_users_table.php 2.7 KB

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