2019_08_05_174325_create_admin_users_table.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateAdminUsersTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('admin_users', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('job_number', 20)->comment('工号');
  17. $table->string('name', 100)->comment('姓名');
  18. $table->string('account', '20')->comment('账户');
  19. $table->char('phone', 12)->comment('手机号');
  20. $table->char('password', 100)->comment('密码');
  21. $table->string('remember_token', 100)->nullable();
  22. $table->string('type', 10)->nullable()->comment('类型');
  23. $table->bigInteger('pid')->default(0)->comment('父级id');
  24. $table->string('area_remark')->nullable()->comment('区域描述');
  25. $table->tinyInteger('status')->default(1);
  26. $table->timestamps();
  27. });
  28. }
  29. /**
  30. * Reverse the migrations.
  31. *
  32. * @return void
  33. */
  34. public function down()
  35. {
  36. Schema::dropIfExists('admin_users');
  37. }
  38. }