2020_06_05_165357_create_pre_users_table.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreatePreUsersTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('users', function(Blueprint $table)
  15. {
  16. $table->increments('id');
  17. $table->string('identity')->nullable()->default('')->comment('身份');
  18. $table->string('token', 100)->nullable()->default('')->index('IDEX_token');
  19. $table->string('username', 100)->nullable()->default('')->unique('IDEX_username')->comment('用户名');
  20. $table->string('nickname')->nullable()->default('')->comment('昵称');
  21. $table->string('userimg')->nullable()->default('')->comment('已审核头像');
  22. $table->string('profession')->nullable()->default('')->comment('职称/职位');
  23. $table->string('encrypt', 50)->nullable()->default('');
  24. $table->string('userpass', 50)->nullable()->default('')->comment('登录密码');
  25. $table->integer('bgid')->nullable()->default(0)->comment('背景ID');
  26. $table->integer('loginnum')->nullable()->default(0)->comment('累计登陆次数');
  27. $table->string('lastip', 20)->nullable()->default('')->comment('最后登录IP');
  28. $table->bigInteger('lastdate')->nullable()->default(0)->comment('最后登录时间');
  29. $table->string('lineip', 20)->nullable()->default('')->index('IDEX_lineip')->comment('最后在线IP(接口)');
  30. $table->bigInteger('linedate')->nullable()->default(0)->comment('最后在线时间(接口)');
  31. $table->string('regip', 20)->nullable()->default('')->comment('注册IP');
  32. $table->bigInteger('regdate')->nullable()->default(0)->comment('注册时间');
  33. $table->text('setting')->nullable();
  34. });
  35. }
  36. /**
  37. * Reverse the migrations.
  38. *
  39. * @return void
  40. */
  41. public function down()
  42. {
  43. Schema::drop('users');
  44. }
  45. }