-- 创建登录失败记录表
CREATE TABLE `login_fail_record` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `account` varchar(100) NOT NULL COMMENT '账号',
  `fail_count` int(11) DEFAULT 0 COMMENT '失败次数',
  `lock_time` datetime DEFAULT NULL COMMENT '锁定时间',
  `is_locked` tinyint(1) DEFAULT 0 COMMENT '是否锁定(0:未锁定,1:已锁定)',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_account` (`account`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='登录失败记录表'; 