create table c_contract
(
    ID                   varchar(36)  not null
        primary key,
    TENANCY_ID           varchar(36)  null,
    DESCRIPTION          varchar(100) null comment '合同名称',
    NOTES                varchar(200) null comment '备注',
    LIFE_STATUS          decimal(1)   null comment '启用状态',
    CREATED_BY           varchar(36)  null,
    CREATED_ON           datetime     null,
    UPDATED_BY           varchar(36)  null,
    UPDATED_ON           datetime     null,
    CONTRACT_NO          varchar(100) null comment '合同号',
    ORIGINAL_CONTRACT_ID varchar(36)  null comment '原始合同号（合同复制的来源）',
    EFFECTIVE_DATE       datetime     null comment '生效日期',
    EXPIRED_DATE         datetime     null comment '失效日期',
    CONFIRM_STATUS       decimal(1)   null comment '审核状态',
    CONFIRM_USER         varchar(36)  null comment '审核人',
    CONFIRM_DATE         datetime     null comment '审核日期',
    ORIGINAL_NAME        varchar(100) null comment '原始合同名（合同复制的来源）',
    IS_DEFAULT           decimal(1)   null comment '是否标准费率',
    DEL_FLAG             decimal(1)   null comment '0=未删除1=已删除',
    CALC_FLAG            decimal(1)   null
)
    comment '自动计费协议表';

INSERT INTO ag_devmysql.c_contract (ID, TENANCY_ID, DESCRIPTION, NOTES, LIFE_STATUS, CREATED_BY, CREATED_ON, UPDATED_BY, UPDATED_ON, CONTRACT_NO, ORIGINAL_CONTRACT_ID, EFFECTIVE_DATE, EXPIRED_DATE, CONFIRM_STATUS, CONFIRM_USER, CONFIRM_DATE, ORIGINAL_NAME, IS_DEFAULT, DEL_FLAG, CALC_FLAG) VALUES ('4a5a85b8a4fb454694d2a27dfe09d41a', 'QHD', 'qhd', null, 1, 'feeadmin', '2022-05-17 17:38:51', 'feeadmin', '2022-05-17 17:38:51', null, null, '2022-05-17 00:00:00', '2022-05-17 23:59:59', 0, null, null, null, 0, 0, 1);
INSERT INTO ag_devmysql.c_contract (ID, TENANCY_ID, DESCRIPTION, NOTES, LIFE_STATUS, CREATED_BY, CREATED_ON, UPDATED_BY, UPDATED_ON, CONTRACT_NO, ORIGINAL_CONTRACT_ID, EFFECTIVE_DATE, EXPIRED_DATE, CONFIRM_STATUS, CONFIRM_USER, CONFIRM_DATE, ORIGINAL_NAME, IS_DEFAULT, DEL_FLAG, CALC_FLAG) VALUES ('870d743d9dbf4b938fca8f5586b78644', 'default', 'test_test_test_test_test_test_test_test', null, 1, 'admin', '2022-04-25 09:54:36', 'admin', '2022-04-25 09:54:51', null, null, '2022-04-01 00:00:00', '2022-04-25 23:59:59', null, null, null, null, 1, 0, null);
INSERT INTO ag_devmysql.c_contract (ID, TENANCY_ID, DESCRIPTION, NOTES, LIFE_STATUS, CREATED_BY, CREATED_ON, UPDATED_BY, UPDATED_ON, CONTRACT_NO, ORIGINAL_CONTRACT_ID, EFFECTIVE_DATE, EXPIRED_DATE, CONFIRM_STATUS, CONFIRM_USER, CONFIRM_DATE, ORIGINAL_NAME, IS_DEFAULT, DEL_FLAG, CALC_FLAG) VALUES ('ccb1deff1086449d87106a6478f34ca4', 'default', '测试合同_测试合同_测试合同_', null, 1, 'admin', '2021-06-10 17:59:42', 'admin', '2022-04-25 10:48:44', '11', null, '2021-06-01 00:00:00', '2026-06-30 23:59:59', 0, null, null, null, 1, 0, 1);
