2024_10_01_025556_create_member_address_table.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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('member_address', function (Blueprint $table) {
  12. $table->id();
  13. $table->bigInteger('user_id')->comment('用户ID');
  14. $table->string('user_name')->nullable()->comment('用户姓名');
  15. $table->string('mobile')->nullable()->comment('手机号');
  16. $table->tinyInteger('sex')->default(1)->nullable()->comment('性别');
  17. $table->string('province')->nullable()->comment('省');
  18. $table->string('city')->nullable()->comment('市');
  19. $table->string('district')->nullable()->comment('区');
  20. $table->string('address')->nullable()->comment('地址');
  21. $table->string('address_info')->nullable()->comment('地址详情');
  22. $table->string('city_code')->nullable();
  23. $table->string('adcode')->nullable();
  24. $table->string('lng')->nullable()->comment('经度');
  25. $table->string('lat')->nullable()->comment('纬度');
  26. $table->tinyInteger('status')->default(0)->comment('状态 1:使用 ');
  27. $table->timestamps();
  28. });
  29. }
  30. /**
  31. * Reverse the migrations.
  32. */
  33. public function down(): void
  34. {
  35. Schema::dropIfExists('system_config');
  36. }
  37. };