vault backup: 2026-01-26 09:27:53

This commit is contained in:
wubaoyong
2026-01-26 09:27:53 +08:00
parent 6630f38c6d
commit 01fc94cf8f
4 changed files with 44 additions and 7 deletions

View File

@@ -51,6 +51,25 @@ CREATE TABLE `new_meiqia`.`auth_info_agent` (
KEY `idx_agent` (`agent_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '认证信息与客服关联表';
CREATE TABLE `user_login_status` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`agent_id` BIGINT NOT NULL,
`platform` VARCHAR(32) NOT NULL COMMENT 'web, ios, android, mac, windows等',
`token` VARCHAR(128) NOT NULL COMMENT '登录token',
`user_agent` VARCHAR(512) DEFAULT NULL,
`ip` VARCHAR(64) DEFAULT NULL,
`isp` VARCHAR(64) DEFAULT NULL,
`country` VARCHAR(64) DEFAULT NULL,
`province` VARCHAR(64) DEFAULT NULL,
`city` VARCHAR(64) DEFAULT NULL,
`status` VARCHAR(32) NOT NULL COMMENT 'online(在线), invisible(隐身), off_duty(离线/登出)',
`login_at` DATETIME NOT NULL,
`updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE INDEX `idx_token` (`token`),
INDEX `idx_agent_platform` (`agent_id`, `platform`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户登录状态表';
INSERT INTO auth_info (phone, password, created_at, updated_at)
SELECT DISTINCT
phone,
@@ -81,4 +100,9 @@ WHERE a.deleted_at IS NULL
SELECT 1 FROM auth_info_agent aia
WHERE aia.auth_info_id = ai.id AND aia.agent_id = a.id
);
```
```sql
alter table smart_card
add map_content json not null comment '带映射的卡片内容' after contents;
```