CREATE TABLE "HUGETEST"."dyh_sy_template"
(
    "id" VARCHAR(100) NOT NULL,
    "sort_order" INT NOT NULL,
    "business_type" INT NOT NULL,
    "template_type" INT NOT NULL,
    "template_name" VARCHAR(100) NOT NULL,
    "template_content" TEXT NOT NULL,
    "create_time" TIMESTAMP(6),
    "update_time" TIMESTAMP(6),
    "create_by" VARCHAR(100) NOT NULL,
    "update_by" VARCHAR(100) NOT NULL,
    "is_delete" INT NOT NULL,
    NOT CLUSTER PRIMARY KEY("id")
) STORAGE(ON "MAIN", CLUSTERBTR);

COMMENT ON TABLE "HUGETEST"."dyh_sy_template" IS '模板表';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."id" IS '主键编号';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."sort_order" IS '排序';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."business_type" IS '业务类型:1、交办回复模板  2、结案模板  3、督办模板';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."template_type" IS '模板类型：1、公共模板  2、个人模板';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."template_name" IS '模板名称';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."template_content" IS '模板内容';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."create_time" IS '创建时间';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."update_time" IS '更新时间';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."create_by" IS '创建者';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."update_by" IS '更新着';
COMMENT ON COLUMN "HUGETEST"."dyh_sy_template"."is_delete" IS '是否删除：0否，1删除';



ALTER SESSION SET 'AUTO_INCREMENT_INCREMENT' =1;
ALTER SESSION SET 'AUTO_INCREMENT_OFFSET' =1;
ALTER SESSION SET 'NO_AUTO_VALUE_ON_ZERO' =1;
CREATE TABLE "HUGETEST"."dyh_case_modify_record"
(
    "id" BIGINT  AUTO_INCREMENT NOT NULL,
    "case_id" VARCHAR(100) NOT NULL,
    "modify_type" VARCHAR(50) NOT NULL,
    "modify_item" VARCHAR(50) NOT NULL,
    "before_content" VARCHAR(2000),
    "after_content" VARCHAR(2000),
    "file_url" VARCHAR(1000),
    "modify_time" VARCHAR(60),
    "modify_user" VARCHAR(100) NOT NULL,
    "modify_attribute" VARCHAR(50) NOT NULL,
    NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "MAIN", CLUSTERBTR) AUTO_INCREMENT = 1;

COMMENT ON TABLE "HUGETEST"."dyh_case_modify_record" IS '修改记录表';
COMMENT ON COLUMN "HUGETEST"."dyh_case_modify_record"."after_content" IS '修改后内容';
COMMENT ON COLUMN "HUGETEST"."dyh_case_modify_record"."before_content" IS '修改前内容';
COMMENT ON COLUMN "HUGETEST"."dyh_case_modify_record"."case_id" IS '关联的案例 ID';
COMMENT ON COLUMN "HUGETEST"."dyh_case_modify_record"."file_url" IS '文件地址';
COMMENT ON COLUMN "HUGETEST"."dyh_case_modify_record"."id" IS '主键编号（自增）';
COMMENT ON COLUMN "HUGETEST"."dyh_case_modify_record"."modify_attribute" IS '修改项';
COMMENT ON COLUMN "HUGETEST"."dyh_case_modify_record"."modify_item" IS '修改属性';
COMMENT ON COLUMN "HUGETEST"."dyh_case_modify_record"."modify_time" IS '修改时间';
COMMENT ON COLUMN "HUGETEST"."dyh_case_modify_record"."modify_type" IS '修改类型';
COMMENT ON COLUMN "HUGETEST"."dyh_case_modify_record"."modify_user" IS '修改人';
