-- ============================================================
-- 湛江市智慧人社运营运维（2025-2027年）项目
-- 就业一湛通服务平台 - 深度分析（补贴管理）达梦数据库建表脚本
-- 
-- 依据：《需求规格说明书》第3.6节 - 深度分析
--   3.6.1  吸纳就业困难人员社保补贴（企业）
--   3.6.2  小微企业社保补贴（企业）
--   3.6.3  灵活就业社保补贴（个人）
--   3.6.4  员工制家政企业社保补贴（企业）
--   3.6.5  一般性岗位补贴（企业）
--   3.6.6  公益性岗位补贴（企业）
--   3.6.7  乡村公益性岗位补贴（企业）
--   3.6.8  公共就业服务岗位补贴（企业）
--   3.6.9  求职创业补贴（个人）
--   3.6.10 粤东粤西粤北地区就业补贴（个人）
--   3.6.11 就业见习补贴（企业）
--   3.6.12 一次性吸纳就业补贴（企业）
--   3.6.13 吸纳退役军人就业补贴（企业）
--   3.6.14 吸纳脱贫人口就业补贴（企业）
--   3.6.15 一次性创业资助（个人）
--   3.6.16 创业租金补贴（个人）
--   3.6.17 创业带动就业补贴（企业）
--   3.6.18 创业孵化补贴（企业）
--   3.6.19 员工制家政企业吸纳就业补贴（企业）
--   3.6.20 家政服务企业商业保险补贴（企业）
--   3.6.21 职业介绍补贴（企业）
-- 数据库：达梦数据库 (DM8)
-- 创建日期：2025-06-10
-- ============================================================

-- ============================================================
-- 3.6.1 吸纳就业困难人员社保补贴（企业）
-- 说明：省平台回流，记录符合吸纳就业困难人员社保补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_ABSORB_DIFFICULT_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    QUALIFIED_COUNT                 INTEGER,
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_ABSORB_DIFFICULT_SUBSIDY IS '吸纳就业困难人员社保补贴（企业）';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.QUALIFIED_COUNT IS '符合条件人数';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.FIRST_DECLARE_DATE IS '首次可以申报日期';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.DEADLINE_DATE IS '补贴限期截止日期';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_ABSORB_DIFFICULT_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_ABSORB_DIFFICULT_SUBSIDY_UNIT ON DA_ABSORB_DIFFICULT_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_ABSORB_DIFFICULT_SUBSIDY_STATUS ON DA_ABSORB_DIFFICULT_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.2 小微企业社保补贴（企业）
-- 说明：省平台回流，记录符合小微企业社保补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_SMALL_MICRO_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    SMALL_MICRO_FLAG                VARCHAR(10),
    QUALIFIED_COUNT                 INTEGER,
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_SMALL_MICRO_SUBSIDY IS '小微企业社保补贴（企业）';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.SMALL_MICRO_FLAG IS '小微企业标识（是/否）';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.QUALIFIED_COUNT IS '符合条件人数';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.FIRST_DECLARE_DATE IS '首次可以申报日期';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.DEADLINE_DATE IS '补贴限期截止日期';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_SMALL_MICRO_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_SMALL_MICRO_SUBSIDY_UNIT ON DA_SMALL_MICRO_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_SMALL_MICRO_SUBSIDY_STATUS ON DA_SMALL_MICRO_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.3 灵活就业社保补贴（个人）
-- 说明：省平台回流，记录符合灵活就业社保补贴条件的个人信息
-- ============================================================
CREATE TABLE DA_FLEXIBLE_EMPLOY_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    ID_CARD                         VARCHAR(50),
    FULL_NAME                       VARCHAR(100),
    DISTRICT                        VARCHAR(50),
    FLEXIBLE_FLAG                   VARCHAR(10),
    PERSON_CATEGORY                 VARCHAR(100),
    CONTACT_PHONE                   VARCHAR(50),
    SOCIAL_SEC_AMOUNT               NUMERIC(18,2),
    SUBSIDY_STANDARD                VARCHAR(100),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_FLEXIBLE_EMPLOY_SUBSIDY IS '灵活就业社保补贴（个人）';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.ID_CARD IS '个人身份证号';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.FULL_NAME IS '姓名';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.DISTRICT IS '所属县区（户籍所在地）';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.FLEXIBLE_FLAG IS '灵活就业标识（是/否）';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.PERSON_CATEGORY IS '人员类别（就业困难人员/高校毕业生/脱贫人口等，以回流数据为准）';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.CONTACT_PHONE IS '联系方式';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.SOCIAL_SEC_AMOUNT IS '社保缴费金额';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.SUBSIDY_STANDARD IS '补贴标准';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_FLEXIBLE_EMPLOY_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_FLEXIBLE_EMPLOY_SUBSIDY_ID_CARD ON DA_FLEXIBLE_EMPLOY_SUBSIDY(ID_CARD);
CREATE INDEX IDX_DA_FLEXIBLE_EMPLOY_SUBSIDY_STATUS ON DA_FLEXIBLE_EMPLOY_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.4 员工制家政企业社保补贴（企业）
-- 说明：省平台回流，记录符合员工制家政企业社保补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_FAMILY_SERVICE_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    FAMILY_SERVICE_FLAG             VARCHAR(10),
    HOUSEKEEPING_COUNT              INTEGER,
    SOCIAL_SEC_AMOUNT               NUMERIC(18,2),
    SUBSIDY_STANDARD                VARCHAR(100),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_FAMILY_SERVICE_SUBSIDY IS '员工制家政企业社保补贴（企业）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.FAMILY_SERVICE_FLAG IS '员工制家政企业标识（是/否）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.HOUSEKEEPING_COUNT IS '家政从业人员数';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.SOCIAL_SEC_AMOUNT IS '社保缴费金额';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.SUBSIDY_STANDARD IS '补贴标准';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_FAMILY_SERVICE_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_FAMILY_SERVICE_SUBSIDY_UNIT ON DA_FAMILY_SERVICE_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_FAMILY_SERVICE_SUBSIDY_STATUS ON DA_FAMILY_SERVICE_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.5 一般性岗位补贴（企业）
-- 说明：省平台回流，记录符合一般性岗位补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_GENERAL_POST_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    GENERAL_POST_FLAG               VARCHAR(10),
    POST_COUNT                      INTEGER,
    QUALIFIED_COUNT                 INTEGER,
    SUBSIDY_STANDARD                VARCHAR(100),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_GENERAL_POST_SUBSIDY IS '一般性岗位补贴（企业）';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.GENERAL_POST_FLAG IS '一般性岗位标识（是/否）';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.POST_COUNT IS '岗位数量';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.QUALIFIED_COUNT IS '符合条件从业人数';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.SUBSIDY_STANDARD IS '补贴标准';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_GENERAL_POST_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_GENERAL_POST_SUBSIDY_UNIT ON DA_GENERAL_POST_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_GENERAL_POST_SUBSIDY_STATUS ON DA_GENERAL_POST_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.6 公益性岗位补贴（企业）
-- 说明：省平台回流，记录符合公益性岗位补贴条件的安置单位信息
-- ============================================================
CREATE TABLE DA_PUBLIC_WELFARE_POST_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    CONTACT_PHONE                   VARCHAR(50),
    PUBLIC_WELFARE_FLAG             VARCHAR(10),
    QUALIFIED_COUNT                 INTEGER,
    SUBSIDY_STANDARD                VARCHAR(100),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_PUBLIC_WELFARE_POST_SUBSIDY IS '公益性岗位补贴（企业）';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.CONTACT_PHONE IS '联系人手机号（经办人）';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.PUBLIC_WELFARE_FLAG IS '公益性岗位标识（是/否）';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.QUALIFIED_COUNT IS '符合条件安置人数';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.SUBSIDY_STANDARD IS '补贴标准';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_PUBLIC_WELFARE_POST_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_PUBLIC_WELFARE_POST_SUBSIDY_UNIT ON DA_PUBLIC_WELFARE_POST_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_PUBLIC_WELFARE_POST_SUBSIDY_STATUS ON DA_PUBLIC_WELFARE_POST_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.7 乡村公益性岗位补贴（企业）
-- 说明：省平台回流，记录符合乡村公益性岗位补贴条件的安置单位信息
-- ============================================================
CREATE TABLE DA_RURAL_WELFARE_POST_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    RURAL_AREA                      VARCHAR(200),
    RURAL_WELFARE_FLAG              VARCHAR(10),
    POST_COUNT                      INTEGER,
    QUALIFIED_COUNT                 INTEGER,
    SUBSIDY_STANDARD                VARCHAR(100),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_RURAL_WELFARE_POST_SUBSIDY IS '乡村公益性岗位补贴（企业）';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.RURAL_AREA IS '乡村区域';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.RURAL_WELFARE_FLAG IS '乡村公益性岗位标识（是/否）';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.POST_COUNT IS '岗位数量';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.QUALIFIED_COUNT IS '符合条件安置人数';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.SUBSIDY_STANDARD IS '补贴标准';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_RURAL_WELFARE_POST_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_RURAL_WELFARE_POST_SUBSIDY_UNIT ON DA_RURAL_WELFARE_POST_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_RURAL_WELFARE_POST_SUBSIDY_STATUS ON DA_RURAL_WELFARE_POST_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.8 公共就业服务岗位补贴（企业）
-- 说明：省平台回流，记录符合公共就业服务岗位补贴条件的机构信息
-- ============================================================
CREATE TABLE DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    ORG_TYPE                        VARCHAR(200),
    PUBLIC_SERVICE_FLAG             VARCHAR(10),
    SERVICE_ITEM                    VARCHAR(200),
    SERVICE_RESULT                  VARCHAR(100),
    SUBSIDY_STANDARD                VARCHAR(100),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY IS '公共就业服务岗位补贴（企业）';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.ORG_TYPE IS '机构类型（公共就业服务中心/街道社区服务站/人力资源服务机构/社会组织，以回流数据为准）';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.PUBLIC_SERVICE_FLAG IS '公共就业服务标识（是/否）';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.SERVICE_ITEM IS '服务项目';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.SERVICE_RESULT IS '服务成效（人数/场次）';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.SUBSIDY_STANDARD IS '补贴标准';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY_UNIT ON DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY_STATUS ON DA_PUBLIC_EMPLOY_SERVICE_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.9 求职创业补贴（个人）
-- 说明：省平台回流，记录符合求职创业补贴条件的个人信息
-- ============================================================
CREATE TABLE DA_JOB_SEEKING_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    ID_CARD                         VARCHAR(50),
    FULL_NAME                       VARCHAR(100),
    DISTRICT                        VARCHAR(50),
    FLEXIBLE_FLAG                   VARCHAR(10),
    PERSON_CATEGORY                 VARCHAR(100),
    JOB_SEEKING_FLAG                VARCHAR(10),
    JOB_SEEKING_STATUS              VARCHAR(50),
    CONTACT_PHONE                   VARCHAR(50),
    SUBSIDY_AMOUNT                  NUMERIC(18,2),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_JOB_SEEKING_SUBSIDY IS '求职创业补贴（个人）';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.ID_CARD IS '个人身份证号';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.FULL_NAME IS '姓名';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.DISTRICT IS '所属县区（户籍所在地）';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.FLEXIBLE_FLAG IS '灵活就业标识（是/否）';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.PERSON_CATEGORY IS '人员类别（就业困难人员/高校毕业生/脱贫人口等，以回流数据为准）';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.JOB_SEEKING_FLAG IS '求职创业补贴标识（是/否）';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.JOB_SEEKING_STATUS IS '求职创业状态（求职中/创业中）';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.CONTACT_PHONE IS '联系方式';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.SUBSIDY_AMOUNT IS '补贴金额';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_JOB_SEEKING_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_JOB_SEEKING_SUBSIDY_ID_CARD ON DA_JOB_SEEKING_SUBSIDY(ID_CARD);
CREATE INDEX IDX_DA_JOB_SEEKING_SUBSIDY_STATUS ON DA_JOB_SEEKING_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.10 粤东粤西粤北地区就业补贴（个人）
-- 说明：省平台回流，记录符合粤东西北地区就业补贴条件的个人信息
-- ============================================================
CREATE TABLE DA_NORTH_REGION_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    ID_CARD                         VARCHAR(50),
    FULL_NAME                       VARCHAR(100),
    DISTRICT                        VARCHAR(50),
    EDUCATION_LEVEL                 VARCHAR(100),
    EMPLOY_REGION                   VARCHAR(50),
    NORTH_REGION_FLAG               VARCHAR(10),
    SOCIAL_SEC_SIX_MONTHS           VARCHAR(10),
    CONTACT_PHONE                   VARCHAR(50),
    SUBSIDY_AMOUNT                  NUMERIC(18,2),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_NORTH_REGION_SUBSIDY IS '粤东粤西粤北地区就业补贴（个人）';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.ID_CARD IS '个人身份证号';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.FULL_NAME IS '姓名';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.DISTRICT IS '所属县区（户籍所在地）';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.EDUCATION_LEVEL IS '学历档次';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.EMPLOY_REGION IS '就业区域（粤东/粤西/粤北）';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.NORTH_REGION_FLAG IS '粤东西北就业补贴标识（是/否）';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.SOCIAL_SEC_SIX_MONTHS IS '社保缴费满6个月（是/否）';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.CONTACT_PHONE IS '联系方式';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.SUBSIDY_AMOUNT IS '补贴金额';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_NORTH_REGION_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_NORTH_REGION_SUBSIDY_ID_CARD ON DA_NORTH_REGION_SUBSIDY(ID_CARD);
CREATE INDEX IDX_DA_NORTH_REGION_SUBSIDY_STATUS ON DA_NORTH_REGION_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.11 就业见习补贴（企业）
-- 说明：省平台回流，记录符合就业见习补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_JOB_INTERNSHIP_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    UNIT_TYPE                       VARCHAR(100),
    INTERNSHIP_FLAG                 VARCHAR(10),
    INTERNSHIP_POST_COUNT           INTEGER,
    INTERN_COUNT                    INTEGER,
    INTERNSHIP_MONTHS               INTEGER,
    SUBSIDY_STANDARD                VARCHAR(100),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_JOB_INTERNSHIP_SUBSIDY IS '就业见习补贴（企业）';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.UNIT_TYPE IS '单位类型（企业/事业单位/社会组织，以回流数据为准）';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.INTERNSHIP_FLAG IS '就业见习单位标识（是/否）';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.INTERNSHIP_POST_COUNT IS '见习岗位数量';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.INTERN_COUNT IS '见习人员数';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.INTERNSHIP_MONTHS IS '见习时长（月）';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.SUBSIDY_STANDARD IS '补贴标准';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_JOB_INTERNSHIP_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_JOB_INTERNSHIP_SUBSIDY_UNIT ON DA_JOB_INTERNSHIP_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_JOB_INTERNSHIP_SUBSIDY_STATUS ON DA_JOB_INTERNSHIP_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.12 一次性吸纳就业补贴（企业）
-- 说明：省平台回流，记录符合一次性吸纳就业补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_ONE_TIME_ABSORB_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    UNIT_TYPE                       VARCHAR(100),
    ONE_TIME_ABSORB_FLAG            VARCHAR(10),
    ABSORB_COUNT                    INTEGER,
    ABSORB_PERSON_CATEGORY          VARCHAR(200),
    SOCIAL_SEC_MONTHS               INTEGER,
    SUBSIDY_AMOUNT                  NUMERIC(18,2),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_ONE_TIME_ABSORB_SUBSIDY IS '一次性吸纳就业补贴（企业）';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.UNIT_TYPE IS '单位类型（企业/事业单位/社会组织，以回流数据为准）';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.ONE_TIME_ABSORB_FLAG IS '一次性吸纳就业补贴标识（是/否）';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.ABSORB_COUNT IS '吸纳人数';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.ABSORB_PERSON_CATEGORY IS '吸纳人员类别（就业困难人员/脱贫人口/高校毕业生等，以回流数据为准）';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.SOCIAL_SEC_MONTHS IS '社保缴费时长（月）';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.SUBSIDY_AMOUNT IS '补贴金额';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_ONE_TIME_ABSORB_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_ONE_TIME_ABSORB_SUBSIDY_UNIT ON DA_ONE_TIME_ABSORB_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_ONE_TIME_ABSORB_SUBSIDY_STATUS ON DA_ONE_TIME_ABSORB_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.13 吸纳退役军人就业补贴（企业）
-- 说明：省平台回流，记录符合吸纳退役军人就业补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_VETERAN_ABSORB_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    UNIT_TYPE                       VARCHAR(100),
    VETERAN_FLAG                    VARCHAR(10),
    VETERAN_COUNT                   INTEGER,
    SOCIAL_SEC_MONTHS               INTEGER,
    SUBSIDY_STANDARD                VARCHAR(100),
    SUBSIDY_TOTAL                   NUMERIC(18,2),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_VETERAN_ABSORB_SUBSIDY IS '吸纳退役军人就业补贴（企业）';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.UNIT_TYPE IS '单位类型（企业/事业单位/社会组织，以回流数据为准）';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.VETERAN_FLAG IS '退役军人吸纳标识（是/否）';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.VETERAN_COUNT IS '吸纳退役军人人数';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.SOCIAL_SEC_MONTHS IS '社保缴费时长（月）';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.SUBSIDY_STANDARD IS '补贴标准';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.SUBSIDY_TOTAL IS '补贴总额（人数×标准）';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_VETERAN_ABSORB_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_VETERAN_ABSORB_SUBSIDY_UNIT ON DA_VETERAN_ABSORB_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_VETERAN_ABSORB_SUBSIDY_STATUS ON DA_VETERAN_ABSORB_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.14 吸纳脱贫人口就业补贴（企业）
-- 说明：省平台回流，记录符合吸纳脱贫人口就业补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_POVERTY_ALLEVIATION_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    UNIT_TYPE                       VARCHAR(100),
    POVERTY_ALLEVIATION_FLAG        VARCHAR(10),
    POVERTY_COUNT                   INTEGER,
    MONITOR_COUNT                   INTEGER,
    SOCIAL_SEC_MONTHS               INTEGER,
    SUBSIDY_TYPE                    VARCHAR(100),
    SUBSIDY_STANDARD                VARCHAR(100),
    SUBSIDY_AMOUNT                  NUMERIC(18,2),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_POVERTY_ALLEVIATION_SUBSIDY IS '吸纳脱贫人口就业补贴（企业）';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.UNIT_TYPE IS '单位类型（企业/事业单位/社会组织，以回流数据为准）';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.POVERTY_ALLEVIATION_FLAG IS '吸纳脱贫人员补贴标识（是/否）';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.POVERTY_COUNT IS '吸纳脱贫人员数';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.MONITOR_COUNT IS '防返贫监测对象数';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.SOCIAL_SEC_MONTHS IS '社保缴费时长（月）';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.SUBSIDY_TYPE IS '补贴类型（一次性吸纳补贴/稳岗补贴，以回流数据为准）';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.SUBSIDY_STANDARD IS '补贴标准（按补贴类型设定的每人补贴金额）';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.SUBSIDY_AMOUNT IS '补贴金额';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_POVERTY_ALLEVIATION_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_POVERTY_ALLEVIATION_SUBSIDY_UNIT ON DA_POVERTY_ALLEVIATION_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_POVERTY_ALLEVIATION_SUBSIDY_STATUS ON DA_POVERTY_ALLEVIATION_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.15 一次性创业资助（个人）
-- 说明：省平台回流，记录符合一次性创业资助条件的个人信息
-- ============================================================
CREATE TABLE DA_ONE_TIME_STARTUP_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    ID_CARD                         VARCHAR(50),
    FULL_NAME                       VARCHAR(100),
    DISTRICT                        VARCHAR(50),
    REGISTER_TYPE                   VARCHAR(100),
    STARTUP_FLAG                    VARCHAR(10),
    SUBSIDY_AMOUNT                  NUMERIC(18,2),
    DRIVE_EMPLOY_COUNT              INTEGER,
    BUSINESS_ADDRESS                VARCHAR(500),
    CONTACT_PHONE                   VARCHAR(50),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_ONE_TIME_STARTUP_SUBSIDY IS '一次性创业资助（个人）';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.ID_CARD IS '个人身份证号';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.FULL_NAME IS '姓名';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.DISTRICT IS '所属县区（户籍所在地）';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.REGISTER_TYPE IS '注册类型（个体工商户/企业/农民专业合作社，以回流数据为准）';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.STARTUP_FLAG IS '创业资助标识（是/否）';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.SUBSIDY_AMOUNT IS '资助金额';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.DRIVE_EMPLOY_COUNT IS '带动就业人数';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.BUSINESS_ADDRESS IS '经营场所地址';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.CONTACT_PHONE IS '联系电话';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_ONE_TIME_STARTUP_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_ONE_TIME_STARTUP_SUBSIDY_ID_CARD ON DA_ONE_TIME_STARTUP_SUBSIDY(ID_CARD);
CREATE INDEX IDX_DA_ONE_TIME_STARTUP_SUBSIDY_STATUS ON DA_ONE_TIME_STARTUP_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.16 创业租金补贴（个人）
-- 说明：省平台回流，记录符合创业租金补贴条件的个人信息
-- ============================================================
CREATE TABLE DA_STARTUP_RENT_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    ID_CARD                         VARCHAR(50),
    FULL_NAME                       VARCHAR(100),
    DISTRICT                        VARCHAR(50),
    REGISTER_TYPE                   VARCHAR(100),
    RENT_FLAG                       VARCHAR(10),
    BUSINESS_ADDRESS                VARCHAR(500),
    LEASE_RECORD_NO                 VARCHAR(100),
    LEASE_TERM                      INTEGER,
    MONTHLY_RENT                    NUMERIC(18,2),
    SUBSIDY_RATIO                   VARCHAR(50),
    MONTHLY_SUBSIDY                 NUMERIC(18,2),
    SUBSIDY_CYCLE                   VARCHAR(50),
    REMAINING_TERM                  INTEGER,
    CONTACT_PHONE                   VARCHAR(50),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_STARTUP_RENT_SUBSIDY IS '创业租金补贴（个人）';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.ID_CARD IS '个人身份证号';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.FULL_NAME IS '姓名';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.DISTRICT IS '所属县区（户籍所在地）';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.REGISTER_TYPE IS '注册类型（个体工商户/企业/农民专业合作社，以回流数据为准）';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.RENT_FLAG IS '创业租金补贴标识（是/否）';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.BUSINESS_ADDRESS IS '经营场所地址';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.LEASE_RECORD_NO IS '租赁备案号';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.LEASE_TERM IS '租赁期限';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.MONTHLY_RENT IS '月租金金额';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.SUBSIDY_RATIO IS '补贴比例';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.MONTHLY_SUBSIDY IS '月补贴金额';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.SUBSIDY_CYCLE IS '补贴周期（按月/按季度，以回流数据为准）';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.REMAINING_TERM IS '剩余补贴期限';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.CONTACT_PHONE IS '联系电话';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_STARTUP_RENT_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_STARTUP_RENT_SUBSIDY_ID_CARD ON DA_STARTUP_RENT_SUBSIDY(ID_CARD);
CREATE INDEX IDX_DA_STARTUP_RENT_SUBSIDY_STATUS ON DA_STARTUP_RENT_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.17 创业带动就业补贴（企业）
-- 说明：省平台回流，记录符合创业带动就业补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_STARTUP_DRIVE_EMPLOY_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    STARTUP_FLAG                    VARCHAR(10),
    EXCLUDE_FLAG                    VARCHAR(10),
    COMPLIANT_HIRE_COUNT            INTEGER,
    NET_INCREASE_COUNT              INTEGER,
    SUBSIDY_TOTAL                   NUMERIC(18,2),
    REGISTER_DATE                   DATE,
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_STARTUP_DRIVE_EMPLOY_SUBSIDY IS '创业带动就业补贴（企业）';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.STARTUP_FLAG IS '初创企业标识';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.EXCLUDE_FLAG IS '排除禁申标识';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.COMPLIANT_HIRE_COUNT IS '合规招用总人数';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.NET_INCREASE_COUNT IS '本期净增用工人数';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.SUBSIDY_TOTAL IS '补贴核算总额';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.REGISTER_DATE IS '企业注册成立日期';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_STARTUP_DRIVE_EMPLOY_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_STARTUP_DRIVE_SUBSIDY_UNIT ON DA_STARTUP_DRIVE_EMPLOY_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_STARTUP_DRIVE_SUBSIDY_STATUS ON DA_STARTUP_DRIVE_EMPLOY_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.18 创业孵化补贴（企业）
-- 说明：省平台回流，记录符合创业孵化补贴条件的孵化基地信息
-- ============================================================
CREATE TABLE DA_STARTUP_INCUBATION_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    INCUBATION_BASE_NO              VARCHAR(100),
    SIX_CATEGORY_FLAG               VARCHAR(10),
    INCUBATION_OCCUPANCY            INTEGER,
    INCUBATION_YEARS                INTEGER,
    SUBSIDY_YEARS                   INTEGER,
    ANNUAL_STANDARD                 NUMERIC(18,2),
    SUBSIDY_TOTAL                   NUMERIC(18,2),
    BUSINESS_REGISTER_DATE          DATE,
    INCUBATION_END_DATE             DATE,
    BUSINESS_ABNORMAL_FLAG          VARCHAR(10),
    CONTACT_PHONE                   VARCHAR(50),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_STARTUP_INCUBATION_SUBSIDY IS '创业孵化补贴（企业）';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码（孵化基地）';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.UNIT_NAME IS '单位名称（孵化基地名称）';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.INCUBATION_BASE_NO IS '人社认定基地编号';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.SIX_CATEGORY_FLAG IS '六类孵化对象标识（是/否）';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.INCUBATION_OCCUPANCY IS '在孵合规户数';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.INCUBATION_YEARS IS '孵化服务年限';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.SUBSIDY_YEARS IS '补贴核算年限';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.ANNUAL_STANDARD IS '年度每户补贴标准';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.SUBSIDY_TOTAL IS '本次应补总金额';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.BUSINESS_REGISTER_DATE IS '营业执照注册日期';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.INCUBATION_END_DATE IS '孵化期满日期';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.BUSINESS_ABNORMAL_FLAG IS '经营异常名录标识';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.CONTACT_PHONE IS '联系人手机';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_STARTUP_INCUBATION_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_STARTUP_INCUBATION_SUBSIDY_UNIT ON DA_STARTUP_INCUBATION_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_STARTUP_INCUBATION_SUBSIDY_STATUS ON DA_STARTUP_INCUBATION_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.19 员工制家政企业吸纳就业补贴（企业）
-- 说明：省平台回流，记录符合员工制家政企业吸纳就业补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_FAMILY_SERVICE_ABSORB_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    AREA_TYPE                       VARCHAR(50),
    MONTHLY_AVG_PERSONS             INTEGER,
    SUBSIDY_TOTAL                   NUMERIC(18,2),
    CONTACT_PHONE                   VARCHAR(50),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_FAMILY_SERVICE_ABSORB_SUBSIDY IS '员工制家政企业吸纳就业补贴（企业）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.AREA_TYPE IS '区域类型（珠三角/粤东西北，以回流数据为准）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.MONTHLY_AVG_PERSONS IS '月平均缴费人数';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.SUBSIDY_TOTAL IS '补贴核算总额';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.CONTACT_PHONE IS '联系人手机';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_FAMILY_SERVICE_ABSORB_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_FAMILY_SERVICE_ABSORB_SUBSIDY_UNIT ON DA_FAMILY_SERVICE_ABSORB_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_FAMILY_SERVICE_ABSORB_SUBSIDY_STATUS ON DA_FAMILY_SERVICE_ABSORB_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.20 家政服务企业商业保险补贴（企业）
-- 说明：省平台回流，记录符合家政服务企业商业保险补贴条件的企业信息
-- ============================================================
CREATE TABLE DA_FAMILY_SERVICE_INSURANCE_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    AREA_TYPE                       VARCHAR(50),
    HOUSEKEEPING_COUNT              INTEGER,
    INSURED_COUNT                   INTEGER,
    ANNUAL_PREMIUM                  NUMERIC(18,2),
    SUBSIDY_TOTAL                   NUMERIC(18,2),
    SUBSIDY_YEARS                   INTEGER,
    CONTACT_PHONE                   VARCHAR(50),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_FAMILY_SERVICE_INSURANCE_SUBSIDY IS '家政服务企业商业保险补贴（企业）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.AREA_TYPE IS '区域类型（珠三角/粤东西北，以回流数据为准）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.HOUSEKEEPING_COUNT IS '家政服务人员数';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.INSURED_COUNT IS '购买商业保险人数';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.ANNUAL_PREMIUM IS '年度保费总额';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.SUBSIDY_TOTAL IS '补贴核算总额';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.SUBSIDY_YEARS IS '享受补贴年限';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.CONTACT_PHONE IS '联系人手机';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_FAMILY_SERVICE_INSURANCE_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_FAMILY_SERVICE_INSURANCE_SUBSIDY_UNIT ON DA_FAMILY_SERVICE_INSURANCE_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_FAMILY_SERVICE_INSURANCE_SUBSIDY_STATUS ON DA_FAMILY_SERVICE_INSURANCE_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 3.6.21 职业介绍补贴（企业）
-- 说明：省平台回流，记录符合职业介绍补贴条件的人力资源服务机构信息
-- ============================================================
CREATE TABLE DA_JOB_INTRODUCTION_SUBSIDY (
    ID                              VARCHAR(36)     NOT NULL,
    RECORD_ID                       VARCHAR(100),
    UNIT_CREDIT_CODE                VARCHAR(50),
    UNIT_NAME                       VARCHAR(200),
    DISTRICT                        VARCHAR(50),
    AGENCY_RECORD_NO                VARCHAR(100),
    COMPLIANT_REFERRAL_COUNT        INTEGER,
    SINGLE_STANDARD                 NUMERIC(18,2),
    SUBSIDY_TOTAL                   NUMERIC(18,2),
    STABLE_EMPLOY_MONTHS            INTEGER,
    CONTACT_PHONE                   VARCHAR(50),
    FIRST_DECLARE_DATE              DATE,
    DEADLINE_DATE                   DATE,
    DECLARE_STATUS                  VARCHAR(50),
    LAST_NOTIFY_TIME                DATE,
    DATA_REFLUX_TIME                DATE,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_JOB_INTRODUCTION_SUBSIDY IS '职业介绍补贴（企业）';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.ID IS '主键ID';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.RECORD_ID IS '备案记录ID（省平台唯一标识，用于数据关联）';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.UNIT_CREDIT_CODE IS '单位统一社会信用代码';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.UNIT_NAME IS '单位名称';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.DISTRICT IS '所属县区';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.AGENCY_RECORD_NO IS '中介备案编号';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.COMPLIANT_REFERRAL_COUNT IS '成功合规介绍人数';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.SINGLE_STANDARD IS '单人补贴核定标准';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.SUBSIDY_TOTAL IS '本期补贴核算总额';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.STABLE_EMPLOY_MONTHS IS '稳定就业达标月数';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.CONTACT_PHONE IS '联系人手机';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.FIRST_DECLARE_DATE IS '首次可申报日期';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.DEADLINE_DATE IS '补贴期限截止日期';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.DECLARE_STATUS IS '申报状态（未申报/已申报/待审核/已通过/已驳回）';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.LAST_NOTIFY_TIME IS '最后通知时间（发送消息后自动记录时间）';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.DATA_REFLUX_TIME IS '数据回流时间';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_JOB_INTRODUCTION_SUBSIDY.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_JOB_INTRODUCTION_SUBSIDY_UNIT ON DA_JOB_INTRODUCTION_SUBSIDY(UNIT_CREDIT_CODE);
CREATE INDEX IDX_DA_JOB_INTRODUCTION_SUBSIDY_STATUS ON DA_JOB_INTRODUCTION_SUBSIDY(DECLARE_STATUS);


-- ============================================================
-- 公共消息表
-- 说明：记录系统各业务模块发送的消息通知，统一管理消息记录
-- ============================================================
CREATE TABLE DA_MESSAGE (
    ID                              VARCHAR(36)     NOT NULL,
    BIZ_MODULE_NAME                 VARCHAR(100),
    BIZ_ID                          VARCHAR(36),
    MSG_TITLE                       VARCHAR(200),
    MSG_CONTENT                     TEXT,
    SENDER                          VARCHAR(100),
    SEND_TIME                       DATETIME,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_MESSAGE IS '公共消息表';
COMMENT ON COLUMN DA_MESSAGE.ID IS '主键ID';
COMMENT ON COLUMN DA_MESSAGE.BIZ_MODULE_NAME IS '所属业务模块名称';
COMMENT ON COLUMN DA_MESSAGE.BIZ_ID IS '关联业务ID';
COMMENT ON COLUMN DA_MESSAGE.MSG_TITLE IS '消息标题';
COMMENT ON COLUMN DA_MESSAGE.MSG_CONTENT IS '消息内容';
COMMENT ON COLUMN DA_MESSAGE.SENDER IS '发送人';
COMMENT ON COLUMN DA_MESSAGE.SEND_TIME IS '发送时间';
COMMENT ON COLUMN DA_MESSAGE.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_MESSAGE.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_MESSAGE.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_MESSAGE.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_MESSAGE.SYS_ORG_CODE IS '组织机构编号';

CREATE INDEX IDX_DA_MESSAGE_BIZ_MODULE ON DA_MESSAGE(BIZ_MODULE_NAME);
CREATE INDEX IDX_DA_MESSAGE_BIZ_ID ON DA_MESSAGE(BIZ_ID);


-- ============================================================
-- 消息模版表
-- 说明：存储消息通知的模板，用于统一消息内容的格式
-- ============================================================
CREATE TABLE DA_MESSAGE_TEMPLATE (
    ID                              VARCHAR(36)     NOT NULL,
    TEMPLATE_NAME                   VARCHAR(200),
    TEMPLATE_CONTENT                TEXT,
    CREATE_BY                       VARCHAR(50),
    CREATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UPDATE_BY                       VARCHAR(50),
    UPDATE_TIME                     DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    SYS_ORG_CODE                    VARCHAR(50),
    PRIMARY KEY (ID)
);

COMMENT ON TABLE DA_MESSAGE_TEMPLATE IS '消息模版表';
COMMENT ON COLUMN DA_MESSAGE_TEMPLATE.ID IS '主键ID';
COMMENT ON COLUMN DA_MESSAGE_TEMPLATE.TEMPLATE_NAME IS '模板名称';
COMMENT ON COLUMN DA_MESSAGE_TEMPLATE.TEMPLATE_CONTENT IS '模板内容';
COMMENT ON COLUMN DA_MESSAGE_TEMPLATE.CREATE_BY IS '创建人';
COMMENT ON COLUMN DA_MESSAGE_TEMPLATE.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DA_MESSAGE_TEMPLATE.UPDATE_BY IS '修改人';
COMMENT ON COLUMN DA_MESSAGE_TEMPLATE.UPDATE_TIME IS '更新时间';
COMMENT ON COLUMN DA_MESSAGE_TEMPLATE.SYS_ORG_CODE IS '组织机构编号';