increments('id')->comment('用户ID'); $table->string('name', 255)->comment('用户名'); $table->char('real_name', 20)->comment('实名'); $table->string('password', 255)->nullable()->comment('密码'); $table->rememberToken(); $table->string('email', 100)->comment('EMAIL'); $table->char('mobile', 11)->comment('手机号'); $table->string('avatar', 255)->comment('用户头像'); $table->tinyInteger('type')->comment('类型,0:用户,1:员工'); $table->dateTime('last_login_time')->nullable()->comment('最后一次登录时间'); $table->tinyInteger('status')->default(1)->comment('状态,1启用0禁用'); $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'); } }