increments('id'); $table->integer('merchant_id')->default(0)->comment('服务商id,0表示本站'); $table->integer('from_user_id')->default(0)->comment('外站来源uid'); $table->string('nickname', 120)->comment('昵称'); $table->string('mobile', 11)->nullable()->comment('手机'); $table->string('email', 120)->nullable()->comment('邮箱'); $table->string('alipay_account', 220)->nullable()->comment('支付宝账号手机/邮箱'); $table->string('weixin_account', 220)->nullable()->comment('微信账号openid'); $table->string('password')->nullable()->comment('密码'); $table->tinyInteger('login_status')->default(1)->comment('登陆状态:1启用,0禁用'); $table->integer('last_number')->default(0)->comment('登陆次数'); $table->string('ip', 60)->default('')->comment('登陆IP'); $table->string('host',200)->nullable()->comment('来源域名'); $table->string('from_ip',200)->nullable()->comment('注册IP'); $table->dateTime('last_time')->nullable()->comment('最后登陆时间'); $table->string('remember_token',120)->nullable()->comment('记录登陆'); $table->timestamps(); $table->softDeletes();//软删除 $table->index('merchant_id'); $table->index('nickname'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); } }