app-cloudep-permission-server/generate/database/mysql/20240819013052_create_roles...

12 lines
590 B
SQL

CREATE TABLE `role`
(
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'PK',
`role_id` varchar(50) NOT NULL,
`display_name` varchar(255) NOT NULL COMMENT '名稱',
`status` tinyint NOT NULL DEFAULT '1' COMMENT '狀態 1: 啟用, 2: 禁用',
`create_time` bigint DEFAULT 0 NOT NULL COMMENT '創建時間',
`update_time` bigint DEFAULT 0 NOT NULL COMMENT '更新時間',
PRIMARY KEY (`id`),
UNIQUE KEY `uid_unique_key` (`role_id`),
UNIQUE KEY `name_unique_key` (`display_name`)
) ENGINE = InnoDB COMMENT ='角色';