Files
yunzerwebsiteallinone/go/docs/sql/create_auth_app_login_ticket.sql
T
2026-10-03 23:46:55 +08:00

14 lines
907 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
CREATE TABLE IF NOT EXISTS `yz_auth_app_login_ticket` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
`ticket` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '一次性登录票据',
`identity_id` BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '认证中心身份ID',
`tid` BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '租户ID(0=待选企业)',
`client_id` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '兑换方应用ID,默认 yz-backend',
`expire_at` DATETIME NOT NULL COMMENT '过期时间',
`used_at` DATETIME NULL DEFAULT NULL COMMENT '核销时间(一次性)',
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_ticket` (`ticket`),
KEY `idx_expire_at` (`expire_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='统一认证-移动端免登录票据';