2017_05_30_203526_create_user_info_table.php 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. /**
  6. * Migration auto-generated by Sequel Pro Laravel Export
  7. * @see https://github.com/cviebrock/sequel-pro-laravel-export
  8. */
  9. class CreateUserInfoTable extends Migration
  10. {
  11. /**
  12. * Run the migrations.
  13. *
  14. * @return void
  15. */
  16. public function up()
  17. {
  18. Schema::create('user_info', function (Blueprint $table) {
  19. $table->increments('id')->comment('用户ID');
  20. $table->integer('site_id')->nullable()->comment('站点ID');
  21. $table->char('username', 64)->nullable()->comment('登录名');
  22. $table->char('real_name', 20)->comment('姓名');
  23. $table->string('password', 255)->nullable()->comment('密码');
  24. $table->string('email', 100)->comment('EMAIL');
  25. $table->char('mobile', 11)->comment('手机号');
  26. $table->string('avatar', 255)->comment('用户头像');
  27. $table->tinyInteger('gender')->comment('性别,1:男,2:女,参照数据字典');
  28. $table->integer('province')->nullable()->comment('居住地址省');
  29. $table->integer('city')->nullable()->comment('居住地址市');
  30. $table->integer('county')->nullable()->comment('居住地址区县');
  31. $table->tinyInteger('work_type')->nullable()->comment('工作类型:上班,自由职业者');
  32. $table->text('other_info')->nullable()->comment('配偶或其他信息');
  33. $table->string('address', 255)->comment('详细地址');
  34. $table->unsignedTinyInteger('address_time')->nullable()->comment('居住时长');
  35. $table->unsignedTinyInteger('home_type')->nullable()->comment('居住类型');
  36. $table->char('idcard', 20)->nullable()->comment('身份证号');
  37. $table->string('idcard_positive', 500)->nullable()->comment('身份证正面');
  38. $table->string('idcard_back', 500)->nullable()->comment('身份证背面');
  39. $table->string('photo', 500)->nullable()->comment('正面照');
  40. $table->string('zhima_img', 500)->nullable()->comment('芝麻信用');
  41. $table->string('other_img', 500)->nullable();
  42. $table->string('driver_img', 500)->nullable();
  43. $table->tinyInteger('educational')->nullable()->comment('学历');
  44. $table->tinyInteger('marital')->nullable()->comment('婚姻状况');
  45. $table->tinyInteger('contact_bind')->nullable()->comment('直系亲属联系人关系');
  46. $table->char('contact_name', 32)->nullable()->comment('直系亲属联系人姓名');
  47. $table->char('contact_mobile', 11)->nullable()->comment('直系亲属联系人手机');
  48. $table->tinyInteger('other_contact_bind')->nullable()->comment('其他联系人关系');
  49. $table->char('other_contact_name', 32)->nullable()->comment('直系亲属联系人姓名');
  50. $table->char('other_contact_mobile', 11)->nullable()->comment('直系亲属联系人手机');
  51. $table->string('xuexin_account', 20)->nullable()->comment('学信网账号');
  52. $table->string('xuexin_password', 60)->nullable()->comment('学信网密码');
  53. $table->char('carrieroperator_mobile', 11)->nullable()->comment('运营商手机');
  54. $table->dateTime('last_login_time')->nullable()->comment('最后一次登录时间');
  55. $table->string('remember_token', 255)->nullable();
  56. $table->timestamps();
  57. $table->softDeletes();
  58. $table->index('deleted_at', 'idx_deleted_at');
  59. });
  60. }
  61. /**
  62. * Reverse the migrations.
  63. *
  64. * @return void
  65. */
  66. public function down()
  67. {
  68. Schema::dropIfExists('user_info');
  69. }
  70. }