diff --git a/src/main/resources/投ä¿�-评审修改.sql b/src/main/resources/投ä¿�-评审修改.sql deleted file mode 100644 index 961b666..0000000 --- a/src/main/resources/投ä¿�-评审修改.sql +++ /dev/null @@ -1,355 +0,0 @@ -alter table risk_compensatory_contract_info - add column contract_type varchar(32) not null default 'GUARANTEE' comment 'ºÏÔ¼ÀàÐÍ£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.api.contract.enums.ContractTypeEnum'; - -alter table risk_compensatory_order_info - add column compensatory_contract_no varchar(64) not null default '' comment '´ú³¥ºÏÔ¼ºÅ', - add column loan_status varchar(32) not null default '' comment '½è¾Ý״̬£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.common.enums.compensatory.LoanStatusEnum', - add column insurance_flag varchar(32) not null default '' comment 'Ͷ±£±êʶ£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.common.enums.compensatory.InsuranceFlagEnum', - add column area_code varchar(64) not null default '' comment 'ÇøÓò±àÂ룻ʡ±àÂ룻ALL=ËùÓУ¬ÉϺ£¡¢¹ã¶«...', - add column period_num int default null comment 'ÆÚÊýÊýÁ¿£»ÆÚÊý', - add column terminate_time datetime default null comment '½áÇåʱ¼ä'; - -create table `risk_insurance_contract_info` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬ÓÃÓÚ±êʶÐмǼÊý¾ÝÀ´Ô´»·¾³¡£ÆäÖÐÈ«Á¿Ã¶¾Ù£ºÏßÏ£ºDEV(¿ª·¢»·¾³)£¬SIT(¼¯³É²âÊÔ»·¾³)£¬STB(Îȶ¨»·¾³)£»ÏßÉÏ£ºPRE(Ô¤·¢»·¾³)£¬GRY(»Ò¶È»·¾³)£¬PRD(Éú²ú»·¾³)', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `enabled_flag` tinyint(4) not null default '0' comment 'ÆôÓñêʶ£º0=δÆôÓã¬1=ÒÑÆôÓÃ', - `checked_at` datetime default null comment 'ÉóºËʱ¼ä', - `checked_by` varchar(128) not null default '' comment 'ÉóºËÈË', - `config_changed_flag` tinyint(4) not null default '0' comment 'ÅäÖñä¸ü±êʶ£º0=²»´æÔÚ´ýÉóºË£¬1=´æÔÚ´ýÉóºË', - `compensatory_contract_no` varchar(64) not null default '' comment '´ú³¥ºÏÔ¼±àºÅ', - `insurer_org_ip_r_id` varchar(64) not null default '' comment '±£ÏÕÈË»ú¹¹iprid', - `applicant_org_ip_r_id` varchar(64) not null default '' comment 'Ͷ±£ÈË»ú¹¹iprid', - `insurance_mode` varchar(32) not null default '' comment 'Ͷ±£Ä£Ê½£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.api.contract.enums.InsuranceModeEnum', - `insurance_amount_basis` varchar(32) not null default '' comment '±£ÏÕ½ð¶î»ù×¼£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.api.contract.enums.InsuranceAmountBasisEnum', - `insurance_cost_calculate_rule` varchar(128) not null default '' comment '±£·Ñ¼ÆËã¹æÔò£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.api.contract.enums.InsuranceCostCalculateRuleEnum', - `insurance_cost_calculate_rounding_mode` varchar(32) not null default '' comment '±£·Ñ¼ÆËãÉáλģʽ£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.api.contract.enums.InsuranceCostCalculateRoundingModeEnum', - `insurance_flow_cfg_code` varchar(64) not null default '' comment 'Ͷ±£Á÷³ÌÅäÖñí±àÂë', - `pack_day` varchar(32) not null default '' comment '´ò°üÈÕ£»¸ñʽ£ºDD', - `pack_frequency` varchar(128) not null default '' comment '´ò°üƵÂÊ£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.api.contract.enums.PackFrequencyEnum', - `pack_basis` varchar(128) not null default '' comment '´ò°ü»ù×¼£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.api.contract.enums.PackBasisEnum', - `pack_rule` varchar(32) not null default '' comment '´ò°ü¹æÔò£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.api.contract.enums.PackRuleEnum', - PRIMARY KEY (`id`), - KEY `idx_compensatory_contract_no` (`compensatory_contract_no`), - KEY `idx_insurance_flow_cfg_code` (`insurance_flow_cfg_code`) -) default charset=utf8mb4 comment='Ͷ±£ºÏÔ¼ÐÅÏ¢±í'; - -create table `risk_insurance_flow_cfg` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬ÓÃÓÚ±êʶÐмǼÊý¾ÝÀ´Ô´»·¾³¡£ÆäÖÐÈ«Á¿Ã¶¾Ù£ºÏßÏ£ºDEV(¿ª·¢»·¾³)£¬SIT(¼¯³É²âÊÔ»·¾³)£¬STB(Îȶ¨»·¾³)£»ÏßÉÏ£ºPRE(Ô¤·¢»·¾³)£¬GRY(»Ò¶È»·¾³)£¬PRD(Éú²ú»·¾³)', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `enabled_flag` tinyint(4) not null default '0' comment 'ÆôÓñêʶ£º0=δÆôÓã¬1=ÒÑÆôÓÃ', - `checked_by` varchar(128) not null default '' comment 'ÉóºËÈË', - `checked_at` datetime default null comment 'ÉóºËʱ¼ä', - `config_changed_flag` tinyint(4) not null default '0' comment 'ÅäÖñä¸ü±êʶ£»0=²»´æÔÚ´ýÉóºË£¬1=´æÔÚ´ýÉóºË', - `flow_code` varchar(128) not null default '' comment 'Á÷³Ì±àºÅ', - `flow_name` varchar(128) not null default '' comment 'Á÷³ÌÃû³Æ', - `flow_desc` varchar(512) not null default '' comment 'Á÷³ÌÃèÊö', - PRIMARY KEY (`id`), - KEY `idx_flow_code` (`flow_code`) -) default charset=utf8mb4 comment='·çÏÕͶ±£Á÷³ÌÅäÖñí'; - -create table `risk_insurance_flow_node_cfg` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬ÓÃÓÚ±êʶÐмǼÊý¾ÝÀ´Ô´»·¾³¡£ÆäÖÐÈ«Á¿Ã¶¾Ù£ºÏßÏ£ºDEV(¿ª·¢»·¾³)£¬SIT(¼¯³É²âÊÔ»·¾³)£¬STB(Îȶ¨»·¾³)£»ÏßÉÏ£ºPRE(Ô¤·¢»·¾³)£¬GRY(»Ò¶È»·¾³)£¬PRD(Éú²ú»·¾³)', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `enabled_flag` tinyint(4) not null default '0' comment 'ÆôÓñêʶ£º0=δÆôÓã¬1=ÒÑÆôÓÃ', - `checked_by` varchar(128) not null default '' comment 'ÉóºËÈË', - `checked_at` datetime default null comment 'ÉóºËʱ¼ä', - -- TODO ×Ö¶Î×¢ÊͲ¹³äö¾Ù£» - `flow_code` varchar(64) not null default '' comment 'Á÷³Ì±àºÅ', - `node_code` varchar(64) not null default '' comment '½Úµã±àÂë', - `node_name` varchar(128) not null default '' comment '½ÚµãÃû³Æ', - `node_interaction_way` varchar(32) not null default '' comment '½Úµã½»»¥·½Ê½£º¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.common.enums.compensatory.NodeInteractionWayEnum', - `node_interaction_config_value` varchar(64) not null default '' comment '½Úµã½»»¥ÅäÖÃÖµ', - `next_node_code` varchar(64) not null default '' comment 'ϸö½Úµã±àºÅ', - PRIMARY KEY (`id`), - KEY `idx_flow_code` (`flow_code`), - KEY `idx_node_code` (`node_code`) -) default charset=utf8mb4 comment='·çÏÕͶ±£Á÷³Ì½ÚµãÅäÖñí'; - -create table `risk_insurance_contract_insurance_cost_rate_cfg` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬ÓÃÓÚ±êʶÐмǼÊý¾ÝÀ´Ô´»·¾³¡£ÆäÖÐÈ«Á¿Ã¶¾Ù£ºÏßÏ£ºDEV(¿ª·¢»·¾³)£¬SIT(¼¯³É²âÊÔ»·¾³)£¬STB(Îȶ¨»·¾³)£»ÏßÉÏ£ºPRE(Ô¤·¢»·¾³)£¬GRY(»Ò¶È»·¾³)£¬PRD(Éú²ú»·¾³)', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `enabled_flag` tinyint(4) not null default '0' comment 'ÆôÓñêʶ£º0=δÆôÓã¬1=ÒÑÆôÓÃ', - `checked_by` varchar(128) not null default '' comment 'ÉóºËÈË', - `checked_at` datetime default null comment 'ÉóºËʱ¼ä', - `compensatory_contract_no` varchar(64) not null default '' comment '´ú³¥ºÏÔ¼ºÅ', - `area_code` varchar(64) not null default '' comment 'ÇøÓò±àÂ룻ʡ±àÂ룻ALL=ËùÓУ¬ÉϺ£¡¢¹ã¶«...', - `area_name` varchar(64) not null default '' comment 'ÇøÓòÃû³Æ£»Ê¡Ãû³Æ', - `period_num` int default null comment 'ÆÚÊýÊýÁ¿£ºALL=ËùÓУ¬12¡¢24...', - `insurance_cost_rate` varchar(32) not null default '' comment '±£·Ñ·ÑÂÊ£»Íò·Öλ', - PRIMARY KEY (`id`), - KEY `idx_compensatory_contract_no` (`compensatory_contract_no`) -) default charset=utf8mb4 comment='Ͷ±£ºÏÔ¼±£·Ñ·ÑÂÊÅäÖñí'; - -------TODO ÆÀÉóID£º -create table `risk_insurance_evt` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬DEV/SIT/STB/PRE/GRY/PRD', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `tnt_id` varchar(64) not null default '' comment '×â»§id', - `product_line_code` varchar(64) not null default '' comment '²úÆ·Ïß±àÂë', - `biz_no` varchar(64) not null default '' comment 'ÉÏÓÎÒµÎñµ¥ºÅ£»¸ù¾ÝʼþÀàÐͲ»Ò»Ñù£¬±ÈÈç´ò°üͶ±£µ¥£¬¼Ç¼´ú³¥Ö´ÐÐÈÎÎñÅú´ÎºÅ', - `req_time` datetime not null comment 'ÇëÇóʱ¼ä', - `req_id` varchar(64) not null default '' comment 'ÇëÇóÁ÷Ë®ºÅ', - `evt_type` varchar(32) not null default '' comment 'ʼþÀàÐÍ£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.api.insurance.enums.InsuranceEvtTypeEnum', - `node_code` varchar(64) not null default '' comment '½Úµã±àÂë', - `request_system` varchar(32) not null default '' comment 'ÇëÇóϵͳ', --- TODO ²¹³ä£º¼ûö¾Ù - `operator_type` varchar(32) not null default '' comment '²Ù×÷ÈËÀàÐÍ£º¼ûö¾Ù£º', - `operator_id` varchar(128) not null default '' comment '²Ù×÷ÈËid', - PRIMARY KEY (`id`), - KEY `idx_req_id` (`req_id`), - KEY `idx_req_time` (`req_time`), - KEY `idx_biz_no` (`biz_no`) -) default charset=utf8mb4 comment='Ͷ±£Á÷³Ìʼþ±í'; - -create table `risk_insurance_bill` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬DEV/SIT/STB/PRE/GRY/PRD', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `tnt_id` varchar(64) not null default '' comment '×â»§id', - `product_line_code` varchar(64) not null default '' comment '²úÆ·Ïß±àÂë', - `biz_no` varchar(64) not null default '' comment 'ÉÏÓÎÒµÎñµ¥ºÅ£»´ò°üͶ±£µ¥Á÷³Ì½ÚµãʼþÇëÇóÁ÷Ë®ºÅ£»Íâ¼ü¹ØÁªrisk_insurance_evt.req_id', - `insurance_bill_no` varchar(64) not null default '' comment 'Ͷ±£µ¥¾ÝºÅ£»Éú³É¹æÔòǰ׺£ºIBN_', - `compensatory_contract_no` varchar(64) not null default '' comment '´ú³¥ºÏÔ¼ºÅ', - `pack_date` datetime not null comment '´ò°üÈÕÆÚ', - `insurance_mode` varchar(32) not null default '' comment 'Ͷ±£Ä£Ê½,com.bestpay.ft.compensatory.core.api.contract.enums.InsuranceModeEnum', - `insurance_amount_basis` varchar(32) not null default '' comment '±£ÏÕ½ð¶î»ù×¼£¬com.bestpay.ft.compensatory.core.api.contract.enums.InsuranceAmountBasisEnum', - `insurance_cost_calculate_rule` varchar(64) not null default '' comment '±£·Ñ¼ÆËã¹æÔò,com.bestpay.ft.compensatory.core.api.contract.enums.InsuranceCostCalculateRuleEnum', - `insurance_cost_calculate_rounding_mode` varchar(32) not null default '' comment '±£·Ñ¼ÆËãÉáλģʽ£ºÈ¡Õûģʽ,com.bestpay.ft.compensatory.core.api.contract.enums.InsuranceCostCalculateRoundingModeEnum', - `pack_rule` varchar(32) not null default '' comment '´ò°ü¹æÔò£¬com.bestpay.ft.compensatory.core.api.contract.enums.PackRuleEnum', - `total_insured_subject_count` int(11) not null default 0 comment 'Ͷ±£±êµÄ×ÜÊý£»×ܽè¾ÝÊý', - `total_insurance_amount` bigint(20) not null comment '×ܱ£ÏÕ½ð¶î£¬µ¥Î»£º·Ö', - `insurance_status` varchar(32) not null default '' comment 'Ͷ±£×´Ì¬£»¼ûö¾Ù£ºcom.bestpay.ft.compensatory.core.api.insurance.enums.InsuranceStatusEnum', - `biz_trial_insurance_cost_amount` bigint(20) default null comment 'ÒµÎñÊÔËã±£·Ñ½ð¶î£»µ¥Î»£º·Ö', - `operation_trial_insurance_cost_amount` bigint(20) default null comment 'ÔËÓªÊÔËã±£·Ñ½ð¶î£»µ¥Î»£º·Ö', - `policy_no` varchar(64) not null default '' comment '±£µ¥ºÅ', - `current_flow_node_code` varchar(64) not null default '' comment 'µ±Ç°Á÷³Ì½Úµã±àÂë', - `version_no` int(11) not null default 0 comment '°æ±¾ºÅ£¬ÀÖ¹ÛËø°æ±¾ºÅ£¬update = Ô­Öµ+1£¬³õʼ»¯=0', - PRIMARY KEY (`id`), - KEY `idx_insurance_bill_no` (`insurance_bill_no`), - KEY `idx_compensatory_contract_no` (`compensatory_contract_no`), - KEY `idx_policy_no` (`policy_no`), - KEY `idx_biz_no` (`biz_no`) -) default charset=utf8mb4 comment='Ͷ±£µ¥¾Ý±í'; - -create table `risk_insurance_cmd` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬DEV/SIT/STB/PRE/GRY/PRD', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `tnt_id` varchar(64) not null default '' comment '×â»§id', - `product_line_code` varchar(64) not null default '' comment '²úÆ·Ïß±àÂë', - `insurance_bill_no` varchar(64) not null default '' comment 'Ͷ±£µ¥ºÅ£»¹ØÁªrisk_insurance_bill.insurance_bill_no', - `compensatory_contract_no` varchar(64) not null default '' comment '´ú³¥ºÏÔ¼ºÅ', - `flow_node_code` varchar(64) not null default '' comment 'Á÷³Ì½Úµã±àÂë', - `cmd_no` varchar(64) not null default '' comment 'Ö¸ÁîºÅ', - `cmd_type` varchar(32) not null default '' comment 'Ö¸ÁîÀàÐÍ,com.bestpay.ft.compensatory.core.api.insurance.enums.InsuranceCmdTypeEnum', - `cmd_exec_start_time` datetime default null comment 'Ö¸ÁîÖ´ÐпªÊ¼Ê±¼ä', - `cmd_exec_end_time` datetime default null comment 'Ö¸ÁîÖ´ÐнáÊøÊ±¼ä', - `cmd_status` varchar(32) not null default '' comment 'Ö¸Áî״̬£¬com.bestpay.ft.compensatory.core.api.insurance.enums.InsuranceCmdStatusEnum', - `ext_biz_no` varchar(128) not null default '' comment 'ÍØÕ¹ÒµÎñµ¥ºÅ£»ÍⲿҵÎñµ¥ºÅ', - `fail_code` varchar(32) NOT NULL DEFAULT '' COMMENT 'ʧ°Ü±àÂë', - `fail_message` varchar(128) NOT NULL DEFAULT '' COMMENT 'ʧ°ÜÏûÏ¢', - PRIMARY KEY (`id`), - KEY `idx_cmd_no` (`cmd_no`), - KEY `idx_compensatory_contract_no` (`compensatory_contract_no`), - KEY `idx_biz_no` (`biz_no`) -) default charset=utf8mb4 comment='Ͷ±£Ö´ÐÐÖ¸Áî±í'; - -create table `risk_insurance_subject_bill` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬DEV/SIT/STB/PRE/GRY/PRD', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `tnt_id` varchar(64) not null default '' comment '×â»§id', - `product_line_code` varchar(64) not null default '' comment '²úÆ·Ïß±àÂë', - `insurance_subject_bill_no` varchar(64) not null default '' comment 'Ͷ±£±êµÄµ¥¾ÝºÅ', - `insurance_bill_no` varchar(64) not null default '' comment 'Ͷ±£µ¥¾ÝºÅ£»Íâ¼ü', - `compensatory_contract_no` varchar(64) not null default '' comment '´ú³¥ºÏÔ¼ºÅ', - `fund_org_contract_no` varchar(64) not null default '' comment '×ʽð»ú¹¹ºÏÔ¼ºÅ', - `loan_no` varchar(64) not null default '' comment '½è¾ÝºÅ', - `insurance_start_season` varchar(32) not null default '' comment 'Ͷ±£¿ªÊ¼ÕËÆÚ£»¸ñʽ£ºyyyyMM', - `insurance_end_season` varchar(32) not null default '' comment 'Ͷ±£½áÊøÕËÆÚ£»¸ñʽ£ºyyyyMM', - `insurance_amount` bigint(20) not null comment '±£ÏÕ½ð¶î£»µ¥Î»£º·Ö', - `insurance_status` varchar(32) not null default '' comment 'Ͷ±£×´Ì¬£ºcom.bestpay.ft.compensatory.core.api.insurance.enums.InsuranceSubjectInsuranceStatusEnum', - `insurance_status_desc` varchar(256) not null default '' comment 'Ͷ±£×´Ì¬ÃèÊö', - `version_no` int(11) not null default 0 comment '°æ±¾ºÅ£¬ÀÖ¹ÛËø°æ±¾ºÅ£¬update = Ô­Öµ+1£¬³õʼ»¯=0', - PRIMARY KEY (`id`), - KEY `idx_insurance_subject_bill_no` (`insurance_subject_bill_no`), - KEY `idx_insurance_bill_no` (`insurance_bill_no`), - KEY `idx_loan_no` (`loan_no`) -) default charset=utf8mb4 comment='Ͷ±£±êµÄµ¥¾Ý±í'; - -create table `risk_insurance_subject_insurance_cost_info` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬DEV/SIT/STB/PRE/GRY/PRD', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `tnt_id` varchar(64) not null default '' comment '×â»§id', - `product_line_code` varchar(64) not null default '' comment '²úÆ·Ïß±àÂë', - `insurance_subject_bill_no` varchar(64) not null default '' comment 'Ͷ±£±êµÄµ¥¾ÝºÅ£»Íâ¼ü', - `insurance_bill_no` varchar(64) not null default '' comment 'Ͷ±£µ¥¾ÝºÅ£»ÈßÓà', - `compensatory_contract_no` varchar(64) not null default '' comment '´ú³¥ºÏÔ¼ºÅ£»ÈßÓà', - `fund_org_contract_no` varchar(64) not null default '' comment '×ʽð»ú¹¹ºÏÔ¼ºÅ£»ÈßÓà', - `loan_no` varchar(64) not null default '' comment '½è¾ÝºÅ£»ÈßÓà', - `insurance_cost_rate` varchar(64) not null default '' comment '±£·Ñ·ÑÂÊ£»ÈßÓà', - `biz_trial_insurance_cost_amount` bigint(20) default null comment 'ÒµÎñÊÔËã±£·Ñ½ð¶î£»µ¥Î»£»·Ö', - `operation_trial_insurance_cost_amount` bigint(20) default null comment 'ÔËÓªÊÔËã±£·Ñ½ð¶î£»µ¥Î»£º·Ö', - `insurance_company_insurance_cost_amount` bigint(20) default null comment '±£Ë¾±£·Ñ½ð¶î£»µ¥Î»£º·Ö', - PRIMARY KEY (`id`), - KEY `idx_insurance_subject_bill_no` (`insurance_subject_bill_no`), - KEY `idx_insurance_bill_no` (`insurance_bill_no`), - KEY `idx_compensatory_contract_no` (`compensatory_contract_no`), - KEY `idx_loan_no` (`loan_no`) -) default charset=utf8mb4 comment='Ͷ±£±êµÄ±£·ÑÐÅÏ¢±í'; - ---- ÆÀÉóID£ºhkoz8gfwly -create table `risk_insurance_loan_notify_evt` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬DEV/SIT/STB/PRE/GRY/PRD', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `tnt_id` varchar(64) not null default '' comment '×â»§id', - `product_line_code` varchar(64) not null default '' comment '²úÆ·Ïß±àÂë', - `req_time` datetime not null comment 'ÇëÇóʱ¼ä', - `req_id` varchar(64) not null default '' comment 'ÇëÇóÁ÷Ë®ºÅ', - `biz_no` varchar(64) not null default '' comment 'ÉÏÓÎÒµÎñµ¥ºÅ£»½è¾ÝºÅ', - `compensatory_contract_no` varchar(64) not null default '' comment '´ú³¥ºÏÔ¼ºÅ', - PRIMARY KEY (`id`), - KEY `idx_req_id` (`req_id`), - KEY `idx_req_time` (`req_time`), - KEY `idx_biz_no` (`biz_no`) -) default charset=utf8mb4 comment='Ͷ±£½è¾Ý֪ͨʼþ±í'; - -create table `risk_insurance_policy_bill` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬DEV/SIT/STB/PRE/GRY/PRD', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `tnt_id` varchar(64) not null default '' comment '×â»§id', - `product_line_code` varchar(64) not null default '' comment '²úÆ·Ïß±àÂë', - `biz_no` varchar(64) not null default '' comment 'ÉÏÓÎÒµÎñµ¥ºÅ£»Â¼Èë±£µ¥Á÷³Ì½ÚµãʼþÇëÇóÁ÷Ë®ºÅ£»¹ØÁªrisk_insurance_evt.req_id', - `insurance_bill_no` varchar(64) not null default '' comment 'Ͷ±£µ¥¾ÝºÅ£»Íâ¼ü¹ØÁªrisk_insurance_bill.insurance_bill_no', - `policy_no` varchar(64) not null default '' comment '±£µ¥ºÅ', - `compensatory_contract_no` varchar(64) not null default '' comment '´ú³¥ºÏÔ¼ºÅ', - `insurer_org_ip_r_id` varchar(64) not null default '' comment '±£ÏÕÈË»ú¹¹iprid', - `applicant_org_ip_r_id` varchar(64) not null default '' comment 'Ͷ±£ÈË»ú¹¹iprid', - `total_insurance_amount` bigint(20) not null comment '×ܱ£ÏÕ½ð¶î£»µ¥Î»£º·Ö£»×ܹ²ÄÜÀíÅâ¶àÉÙÇ®', - `total_insurance_cost_amount` bigint(20) not null comment '×ܱ£·Ñ½ð¶î£»µ¥Î»£»·Ö£»×ܹ²Òª½»¶àÉÙÇ®', - `total_paid_insurance_cost_amount` bigint(20) default null comment '×ÜÒÑÖ§¸¶±£·Ñ½ð¶î£»µ¥Î»£º·Ö', - `total_pending_payment_insurance_cost_amount` bigint(20) default null comment '×Ü´ýÖ§¸¶±£·Ñ½ð¶î£»µ¥Î»£º·Ö', - `effective_start_date` date default null comment 'ÉúЧ¿ªÊ¼ÈÕÆÚ', - `effective_end_date` date default null comment 'ÉúЧ½áÊøÈÕÆÚ', - `version_no` int(11) not null default 0 comment '°æ±¾ºÅ£»ÀÖ¹ÛËø°æ±¾ºÅ£¬update = Ô­Öµ+1£¬³õʼ»¯=0', - PRIMARY KEY (`id`), - KEY `idx_policy_no` (`policy_no`), - KEY `idx_insurance_bill_no` (`insurance_bill_no`), - KEY `idx_biz_no` (`biz_no`) -) default charset=utf8mb4 comment='±£µ¥µ¥¾Ý±í'; - -create table `risk_insurance_file_info` -( - `id` bigint(20) unsigned not null auto_increment comment 'Ö÷¼üid', - `created_at` datetime not null comment '´´½¨Ê±¼ä', - `created_by` varchar(128) not null default 'sys' comment '´´½¨ÈË', - `updated_at` datetime default null comment '¸üÐÂʱ¼ä', - `updated_by` varchar(128) not null default '' comment '¸üÐÂÈË', - `archived_at` datetime default null comment '¹éµµÊ±¼ä', - `archived_by` varchar(128) not null default '' comment '¹éµµÈË', - `archived_flag` tinyint(4) not null default '0' comment '¹éµµ±êʶ£º0=δ¹éµµ£¬1=Òѹ鵵', - `env` varchar(32) not null default '' comment '»·¾³±êʶ£¬DEV/SIT/STB/PRE/GRY/PRD', - `shadow` tinyint(4) not null default '0' comment 'Ó°×Ó±êʶλ (1 Ó°×ÓÊý¾Ý 0 ·ÇÓ°×ÓÊý¾Ý)', - `insurance_bill_no` varchar(64) not null default '' comment 'Ͷ±£µ¥¾ÝºÅ£»Íâ¼ü¹ØÁª£ºrisk_insurance_bill', - `flow_node_code` varchar(64) not null default '' comment 'Á÷³Ì½Úµã±àÂë', - `file_type` varchar(32) not null default '' comment 'ÎļþÀàÐÍ', - `file_id` varchar(128) not null default '' comment 'ÎļþID', - PRIMARY KEY (`id`), - KEY `idx_insurance_bill_no` (`insurance_bill_no`) -) default charset=utf8mb4 comment='Ͷ±£µ¥ÎļþÐÅÏ¢±í'; \ No newline at end of file