Files
shz-backend/sql/policy_info.sql
2026-01-11 16:48:40 +08:00

54 lines
2.1 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.

-- 政策信息表(瀚高/PostgreSQL
CREATE TABLE policy_info (
id BIGSERIAL PRIMARY KEY,
zcmc VARCHAR(500) NOT NULL,
zclx VARCHAR(100),
zc_level VARCHAR(50),
source_unit VARCHAR(200),
accept_unit VARCHAR(200),
publish_time TIMESTAMP,
zc_content TEXT,
subsidy_standard TEXT,
handle_channel TEXT,
apply_condition TEXT,
file_url VARCHAR(500),
file_name VARCHAR(200),
view_num INT DEFAULT 0,
create_by VARCHAR(64) DEFAULT '',
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
update_by VARCHAR(64) DEFAULT '',
update_time TIMESTAMP,
del_flag CHAR(1) DEFAULT '0',
remark VARCHAR(500) DEFAULT ''
);
-- 表注释
COMMENT ON TABLE policy_info IS '政策信息表';
-- 字段注释
COMMENT ON COLUMN policy_info.id IS '政策ID';
COMMENT ON COLUMN policy_info.zcmc IS '政策名称';
COMMENT ON COLUMN policy_info.zclx IS '政策类型';
COMMENT ON COLUMN policy_info.zc_level IS '政策级别';
COMMENT ON COLUMN policy_info.source_unit IS '发文单位';
COMMENT ON COLUMN policy_info.accept_unit IS '受理单位';
COMMENT ON COLUMN policy_info.publish_time IS '发文时间';
COMMENT ON COLUMN policy_info.zc_content IS '政策内容';
COMMENT ON COLUMN policy_info.subsidy_standard IS '补贴标准';
COMMENT ON COLUMN policy_info.handle_channel IS '经办渠道';
COMMENT ON COLUMN policy_info.apply_condition IS '申报条件';
COMMENT ON COLUMN policy_info.file_url IS '政策文件URL';
COMMENT ON COLUMN policy_info.file_name IS '政策文件名称';
COMMENT ON COLUMN policy_info.view_num IS '浏览数';
COMMENT ON COLUMN policy_info.create_by IS '创建者';
COMMENT ON COLUMN policy_info.create_time IS '创建时间';
COMMENT ON COLUMN policy_info.update_by IS '更新者';
COMMENT ON COLUMN policy_info.update_time IS '更新时间';
COMMENT ON COLUMN policy_info.del_flag IS '删除标志0代表存在 2代表删除';
COMMENT ON COLUMN policy_info.remark IS '备注';
-- 创建索引
CREATE INDEX idx_policy_info_zcmc ON policy_info(zcmc);
CREATE INDEX idx_policy_info_zclx ON policy_info(zclx);
CREATE INDEX idx_policy_info_del_flag ON policy_info(del_flag);