Files
fad_oa/sql/fad_rm_migration_layer3.sql

22 lines
1.4 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.

-- ==========================================================
-- 轧机模块 Layer 3阶段用户权限表
-- 目的:按用户控制哪些人可以强制放行/确认哪些阶段
-- ==========================================================
-- ----------------------------------------------------------
-- 1. fad_rm_stage_user_perm — 阶段用户权限表
-- ----------------------------------------------------------
CREATE TABLE IF NOT EXISTS `fad_rm_stage_user_perm` (
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` BIGINT NOT NULL COMMENT '用户ID',
`stage_key` VARCHAR(50) NOT NULL COMMENT '阶段标识',
`can_override` CHAR(1) DEFAULT '0' COMMENT '是否允许强制放行: 0=否, 1=是',
`can_confirm` CHAR(1) DEFAULT '0' COMMENT '是否允许正常确认: 0=否, 1=是',
`create_by` VARCHAR(64) DEFAULT '' COMMENT '创建者',
`create_time` DATETIME DEFAULT NULL COMMENT '创建时间',
`update_by` VARCHAR(64) DEFAULT '' COMMENT '更新者',
`update_time` DATETIME DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_user_stage` (`user_id`, `stage_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='阶段用户权限表';