修改问题、添加监管数据报送模块
这个提交包含在:
+90
-1
@@ -1,5 +1,5 @@
|
||||
-- Fresh-install DM schema; target 8.4.4.80 Pack89.
|
||||
-- Source fingerprint: 7bfa7516946e6b5a507e14f1bb5faff0bea179ed17878151f95b8c102e5ee547
|
||||
-- Source fingerprint: 8247e55b7ab2e222036d2ba28674ee6956f95526a9ce7f71f18d1981f77802d2
|
||||
-- @statement sys_social
|
||||
CREATE TABLE sys_social (
|
||||
id bigint not null comment '主键',
|
||||
@@ -20560,3 +20560,92 @@ CREATE TRIGGER dg_ut_bc6344924fde92eb BEFORE UPDATE ON ing_original_file FOR EAC
|
||||
IF NOT UPDATING('UPDATE_TIME') THEN :NEW.update_time := LOCALTIMESTAMP; END IF;
|
||||
END;
|
||||
/
|
||||
|
||||
-- @statement dg_reporting_config
|
||||
CREATE TABLE dg_reporting_config (
|
||||
config_id VARCHAR(36 CHAR) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
config_kind VARCHAR(16 CHAR) NOT NULL,
|
||||
config_code VARCHAR(64 CHAR) NOT NULL,
|
||||
config_name VARCHAR(160 CHAR) NOT NULL,
|
||||
parent_id VARCHAR(36 CHAR) NULL,
|
||||
root_id VARCHAR(36 CHAR) NOT NULL,
|
||||
enabled INT NOT NULL DEFAULT 0,
|
||||
state_json CLOB NOT NULL,
|
||||
credential_ref VARCHAR(512 CHAR) NULL,
|
||||
version BIGINT NOT NULL DEFAULT 0,
|
||||
command_sha256 CHAR(64 CHAR) NOT NULL,
|
||||
create_dept BIGINT NOT NULL,
|
||||
create_by BIGINT NOT NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
update_by BIGINT NOT NULL,
|
||||
update_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (organization_id,config_id),
|
||||
CONSTRAINT ck_reporting_kind CHECK (config_kind IN ('DEPARTMENT','SYSTEM','TOPIC')),
|
||||
CONSTRAINT ck_reporting_enabled CHECK (enabled IN (0,1)),
|
||||
CONSTRAINT ck_reporting_version CHECK (version>=0)
|
||||
);
|
||||
|
||||
-- @statement dg_reporting_config
|
||||
CREATE UNIQUE INDEX uk_reporting_code ON dg_reporting_config(organization_id,config_kind,config_code);
|
||||
|
||||
-- @statement dg_reporting_config
|
||||
CREATE INDEX idx_reporting_parent ON dg_reporting_config(organization_id,parent_id,enabled);
|
||||
|
||||
-- @statement dg_reporting_config
|
||||
CREATE INDEX idx_reporting_root ON dg_reporting_config(organization_id,root_id);
|
||||
|
||||
-- @statement dg_reporting_audit
|
||||
CREATE TABLE dg_reporting_audit (
|
||||
audit_id VARCHAR(36 CHAR) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
object_id VARCHAR(36 CHAR) NOT NULL,
|
||||
action_name VARCHAR(40 CHAR) NOT NULL,
|
||||
actor_id BIGINT NOT NULL,
|
||||
object_version BIGINT NOT NULL,
|
||||
reason VARCHAR(1000 CHAR) NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (audit_id)
|
||||
);
|
||||
|
||||
-- @statement dg_reporting_audit
|
||||
CREATE INDEX idx_reporting_audit ON dg_reporting_audit(organization_id,object_id,create_time);
|
||||
|
||||
-- @statement dg_reporting_template
|
||||
CREATE TABLE dg_reporting_template (
|
||||
template_id VARCHAR(36 CHAR) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
file_sha256 CHAR(64 CHAR) NOT NULL,
|
||||
record_element VARCHAR(128 CHAR) NOT NULL,
|
||||
fields_json CLOB NOT NULL,
|
||||
create_by BIGINT NOT NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (organization_id,template_id)
|
||||
);
|
||||
|
||||
-- @statement dg_reporting_template
|
||||
CREATE UNIQUE INDEX uk_reporting_template ON dg_reporting_template(organization_id,file_sha256,record_element);
|
||||
|
||||
-- @statement dg_reporting_standard
|
||||
CREATE TABLE dg_reporting_standard (
|
||||
standard_id VARCHAR(36 CHAR) NOT NULL,
|
||||
organization_id BIGINT NOT NULL,
|
||||
standard_code VARCHAR(128 CHAR) NOT NULL,
|
||||
standard_name VARCHAR(160 CHAR) NOT NULL,
|
||||
version_label VARCHAR(64 CHAR) NOT NULL,
|
||||
standard_status VARCHAR(16 CHAR) NOT NULL,
|
||||
definition_json CLOB NOT NULL,
|
||||
difference_confirmation VARCHAR(1000 CHAR) NULL,
|
||||
command_sha256 CHAR(64 CHAR) NOT NULL,
|
||||
version BIGINT NOT NULL DEFAULT 0,
|
||||
create_by BIGINT NOT NULL,
|
||||
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
update_by BIGINT NOT NULL,
|
||||
update_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (organization_id,standard_id),
|
||||
CONSTRAINT ck_reporting_standard_status CHECK (standard_status IN ('DRAFT','PUBLISHED','DISABLED')),
|
||||
CONSTRAINT ck_reporting_standard_version CHECK (version>=0)
|
||||
);
|
||||
|
||||
-- @statement dg_reporting_standard
|
||||
CREATE UNIQUE INDEX uk_reporting_standard ON dg_reporting_standard(organization_id,standard_code,version_label);
|
||||
|
||||
在新工单中引用
屏蔽一个用户