You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
CREATE TYPE public."enum_problem_type" AS ENUM (
|
|
'一致性',
|
|
'准确性',
|
|
'完整性',
|
|
'有效性',
|
|
'及时性',
|
|
'规范性'
|
|
);
|
|
|
|
CREATE TYPE public."enum_problem_level" AS ENUM (
|
|
'一般',
|
|
'重要',
|
|
'严重'
|
|
);
|
|
|
|
|
|
|
|
create table t_business_rule
|
|
(
|
|
id serial not null,
|
|
name varchar(255) not null,
|
|
description varchar(255) not null,
|
|
problem_type enum_problem_type not null,
|
|
problem_level enum_problem_level not null,
|
|
rule_basis integer not null,
|
|
create_at timestamp with time zone not null
|
|
);
|
|
|
|
comment on table t_business_rule is '业务规则表';
|
|
|
|
comment on column t_business_rule.id is 'ID唯一标识';
|
|
|
|
comment on column t_business_rule.name is '业务规则名称';
|
|
|
|
comment on column t_business_rule.description is '业务规则描述';
|
|
|
|
comment on column t_business_rule.problem_type is '问题类型';
|
|
|
|
comment on column t_business_rule.problem_level is '问题级别';
|
|
|
|
comment on column t_business_rule.rule_basis is '制定依据';
|
|
|
|
comment on column t_business_rule.create_at is '创建时间';
|
|
|
|
create unique index t_business_rule_id_uindex
|
|
on t_business_rule (id);
|
|
|
|
alter table t_business_rule
|
|
add constraint t_business_rule_pk
|
|
primary key (id);
|
|
|
|
|