

-------------------------------------------------------------------------------
--  access
-------------------------------------------------------------------------------
CREATE TABLE AUTH_ACCESS(
        ID BIGINT NOT NULL,
	TYPE VARCHAR(50),
	VALUE VARCHAR(200),
	PERM_ID BIGINT,
	PRIORITY INTEGER,
	DESCN VARCHAR(200),
	SCOPE_ID VARCHAR(50),
	CONSTRAINT PK_AUTH_ACCESS PRIMARY KEY(ID),
	CONSTRAINT FK_AUTH_ACCESS_PERM FOREIGN KEY(PERM_ID) REFERENCES AUTH_PERM(ID)
);

COMMENT ON TABLE AUTH_ACCESS IS '资源';
COMMENT ON COLUMN AUTH_ACCESS.ID IS '主键';
COMMENT ON COLUMN AUTH_ACCESS.TYPE IS '类型';
COMMENT ON COLUMN AUTH_ACCESS.VALUE IS '内容';
COMMENT ON COLUMN AUTH_ACCESS.PERM_ID IS '外键，权限';
COMMENT ON COLUMN AUTH_ACCESS.PRIORITY IS '排序';
COMMENT ON COLUMN AUTH_ACCESS.DESCN IS '备注';
COMMENT ON COLUMN AUTH_ACCESS.SCOPE_ID IS '租户';
