
CREATE TYPE public."enum_standard_type" AS ENUM (
'国家标准',
'行业标准',
'地方标准'
);

create table t_standard_doc
(
	id serial not null,
	doc_name varchar(255) not null,
	standard_type enum_standard_type not null,
	tags varchar(255),
	folder integer,
	path varchar(255) not null,
	create_at timestamp with time zone not null
);

comment on table t_standard_doc is '文档管理文件';

comment on column t_standard_doc.id is 'ID唯一标识';

comment on column t_standard_doc.doc_name is '文档名称';

comment on column t_standard_doc.standard_type is '标准类型';

comment on column t_standard_doc.tags is '标签';

comment on column t_standard_doc.folder is '归属的文件夹';

comment on column t_standard_doc.path is '文档存储路径';

comment on column t_standard_doc.create_at is '文档创建时间';

create unique index t_standard_doc_id_uindex
	on t_standard_doc (id);

alter table t_standard_doc
	add constraint t_standard_doc_pk
		primary key (id);

