increments('id')->comment('用户ID'); $table->string('name', 200)->comment('用户名')->nullable(); $table->string('real_name', 200)->comment('实名')->nullable(); $table->string('password', 255)->nullable()->comment('密码'); $table->rememberToken(); $table->string('email', 100)->comment('EMAIL')->nullable(); $table->char('mobile', 11)->comment('手机号')->nullable(); $table->string('avatar', 255)->comment('用户头像')->nullable(); $table->tinyInteger('type')->comment('类型,0:用户,1:员工')->nullable(); $table->dateTime('last_login_time')->nullable()->comment('最后一次登录时间'); $table->tinyInteger('status')->default(1)->comment('状态,1启用0禁用')->nullable(); $table->tinyInteger('is_root')->nullable()->comment('是否是超级管理员'); $table->text('admin_role_id')->nullable()->comment('角色'); $table->timestamps(); $table->softDeletes(); $table->index('deleted_at', 'idx_deleted_at'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('admin_users'); } }