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

-- 创建表 "t_fzss_fzxz_jg_gis"
CREATE TABLE "t_fzss_fzxz_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),                                                 -- 任务标识码
    "dlb"        VARCHAR(50),                                                 -- 地类别
    "dlbm"       VARCHAR(10),                                                 -- 地类编码
    "dlmc"       VARCHAR(50),                                                 -- 地类名称
    "cjsj"       TIMESTAMP,                                                   -- 创建时间
    "yxfa"       VARCHAR(50),                                                 -- 有效方案
    "bz"         VARCHAR(255),                                                -- 备注
    "tbsl"       INT,                                                         -- 图斑数量
    "tbmj"       NUMERIC(38, 8),                                              -- 图斑面积
    "xzqdm"      VARCHAR(20),                                                 -- 行政区代码
    "xzqmc"      VARCHAR(50),                                                 -- 行政区名称
    "geom"      GEOMETRY(GEOMETRY, 4326)                                     -- 形状
);

-- 添加表注释
COMMENT
ON TABLE "t_fzss_fzxz_jg_gis" IS '辅助选址结果';

-- 添加字段注释
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."objectid" IS '对象ID，自增';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."objectid_1" IS '对象ID_1';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."bsm" IS '标识码';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."rwbsm" IS '任务标识码';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."dlb" IS '地类别';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."dlbm" IS '地类编码';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."dlmc" IS '地类名称';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."cjsj" IS '创建时间';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."yxfa" IS '有效方案';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."bz" IS '备注';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."tbsl" IS '图斑数量';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."tbmj" IS '图斑面积';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."xzqdm" IS '行政区代码';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."xzqmc" IS '行政区名称';
COMMENT
ON COLUMN "t_fzss_fzxz_jg_gis"."geom" IS '形状';
