Files
erp_sb/sql/banma_account.sql
2025-10-10 13:39:16 +08:00

21 lines
1.0 KiB
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.

-- 斑马账号表(与 BanmaAccount 实体、BanmaAccountMapper.xml 一致)
DROP TABLE IF EXISTS `banma_account`;
CREATE TABLE `banma_account` (
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` VARCHAR(64) DEFAULT NULL COMMENT '显示名',
`username` VARCHAR(128) DEFAULT NULL COMMENT '登录用户名',
`token` VARCHAR(512) DEFAULT NULL COMMENT '访问Token客户端刷新后回写',
`token_expire_at` DATETIME DEFAULT NULL COMMENT 'Token过期时间',
`is_default` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否默认 1是 0否',
`status` TINYINT(1) NOT NULL DEFAULT 1 COMMENT '状态 1启用 0停用',
`remark` VARCHAR(255) DEFAULT NULL COMMENT '备注',
`create_by` VARCHAR(64) DEFAULT NULL,
`create_time` DATETIME DEFAULT CURRENT_TIMESTAMP,
`update_by` VARCHAR(64) DEFAULT NULL,
`update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_banma_is_default` (`is_default`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='斑马账号表';