CREATE TABLE "HUGETEST"."dyh_th_grid_event"
(
    "id" VARCHAR(128) NOT NULL,
    "event_code" VARCHAR(128),
    "title" VARCHAR(512),
    "entry_item_name" VARCHAR(128),
    "event_time" VARCHAR(64),
    "sys_org_name" VARCHAR(128),
    "eventX" VARCHAR(64),
    "eventY" VARCHAR(64),
    "address" VARCHAR(512),
    "handle_time" VARCHAR(64),
    "delay_count" VARCHAR(64),
    "now_work_date" VARCHAR(64),
    "yj_flag" VARCHAR(64),
    "processing_time" VARCHAR(64),
    "info_source" VARCHAR(64),
    "cur_node_custom_tag" VARCHAR(128),
    "event_area" VARCHAR(64),
    "select_handle_org_name" VARCHAR(128),
    "status" VARCHAR(64),
    "grid_code" VARCHAR(128),
    "entry_item_code" VARCHAR(128),
    "case_id" CHAR(128),
    "create_time" TIMESTAMP(0),
    "update_time" TIMESTAMP(0),
    "sys_org_id" VARCHAR(128),
    "contact_tel" VARCHAR(128),
    "linkman" VARCHAR(128),
    UNIQUE("case_id"),
    NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."address" IS '位置说明';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."case_id" IS '矛调案件编号';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."contact_tel" IS '电话';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."create_time" IS '创建时间';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."cur_node_custom_tag" IS '当前环节是否有自定义时限';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."delay_count" IS '是否延期';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."entry_item_code" IS '纠纷二级类型';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."entry_item_name" IS '事件事项名称';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."event_area" IS '事发区域';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."event_code" IS '事件编码';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."event_time" IS '事发时间';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."eventX" IS '事发地X坐标';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."eventY" IS '事发地Y坐标';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."grid_code" IS '网格编码';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."handle_time" IS '处理时间';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."id" IS '事件id';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."info_source" IS '事件来源';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."linkman" IS '姓名';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."now_work_date" IS '当前时间';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."processing_time" IS '应处理时间';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."select_handle_org_name" IS '已选择处理机构名称';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."status" IS '事件状态';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."sys_org_id" IS '组织编号';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."sys_org_name" IS '机构名称';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."title" IS '事件标题';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."update_time" IS '修改时间';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event"."yj_flag" IS '是否告警';


CREATE TABLE "HUGETEST"."dyh_th_grid_event_request"
(
    "id" VARCHAR(128) NOT NULL,
    "event_id" VARCHAR(128),
    "case_id" VARCHAR(64),
    "event_status" VARCHAR(32),
    "req_info" TEXT,
    "req_status" INT,
    "error_info" TEXT,
    "create_time" DATETIME(0),
    NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event_request"."case_id" IS '案件编号';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event_request"."create_time" IS '请求时间';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event_request"."error_info" IS '错误信息（失败时会有）';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event_request"."event_id" IS '事件编号';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event_request"."event_status" IS '更新的事件状态';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event_request"."req_info" IS '请求信息';
COMMENT ON COLUMN "HUGETEST"."dyh_th_grid_event_request"."req_status" IS '请求状态（0：请求成功；1：请求失败）';


