-- 删除表 "t_fzss_hgxfx_jg_gis"（如果存在）
DROP TABLE IF EXISTS "t_fzss_hgxfx_jg_gis";

-- 创建表 "t_fzss_hgxfx_jg_gis"
CREATE TABLE "t_fzss_hgxfx_jg_gis"
(
    "objectid"   INT4 PRIMARY KEY DEFAULT nextval('auto_increment_sequence'), -- 对象ID，自增
    "objectid_1" INT4 NOT NULL,                                               -- 对象ID_1
    "bsm"        VARCHAR(50),                                                 -- 标识码
    "rwbsm"      VARCHAR(50),                                                 -- 任务标识码
    "scxbsm"     VARCHAR(50),                                                 -- 生产线标识码
    "ysmc"       VARCHAR(255),                                                -- 要素名称
    "yzmj"       NUMERIC(38, 8),                                              -- 院址面积
    "cjsj"       TIMESTAMP,                                                   -- 创建时间
    "bz"         VARCHAR(255),                                                -- 备注
    "ysdm"       VARCHAR(50),                                                 -- 要素代码
    "objid"      NUMERIC(38, 8),                                              -- 对象ID
    "geom"       GEOMETRY(GEOMETRY, 4326)                                     -- 几何
);

-- 添加表注释
COMMENT
ON TABLE "t_fzss_hgxfx_jg_gis" IS '合规性分析结果';

-- 添加字段注释
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."objectid" IS '对象ID，自增';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."objectid_1" IS '对象ID_1';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."bsm" IS '标识码';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."rwbsm" IS '任务标识码';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."scxbsm" IS '生产线标识码';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."ysmc" IS '要素名称';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."yzmj" IS '院址面积';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."cjsj" IS '创建时间';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."bz" IS '备注';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."ysdm" IS '要素代码';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."objid" IS '对象ID';
COMMENT
ON COLUMN "t_fzss_hgxfx_jg_gis"."geom" IS '几何';
