2024_11_15_040819_create_agent_infos_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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('agent_infos', 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('qual_record_id')->nullable()->comment('代理商资质认证记录编号');
  21. $table->string('state')->default('ENABLE')->comment('状态');
  22. $table->timestamps();
  23. $table->softDeletes();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('agent_infos');
  34. }
  35. };