CREATE TABLE `kwc_contract_logistics_score` (
    `id` bigint NOT NULL COMMENT '主键',
    `provider_ent_id` bigint NOT NULL COMMENT '供应商企业id',
    `logistics_ent_id` bigint NOT NULL COMMENT '物流企业id',
    `logistics_ent_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '物流企业名称',
    `score` decimal(10,2) NOT NULL COMMENT '物流企业评分',
    `create_by` bigint NOT NULL,
    `create_time` datetime NOT NULL,
    `update_by` bigint NOT NULL,
    `update_time` datetime NOT NULL COMMENT '更新时间',
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `provider_logistics_id_index` (`provider_ent_id`,`logistics_ent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='物流企业评分表';


CREATE TABLE `kwc_contract_logistics_score_detail` (
   `id` bigint NOT NULL COMMENT '主键',
   `score_id` bigint NOT NULL COMMENT '评分主键id',
   `influence_by` bigint NOT NULL COMMENT '影响人id',
   `influence_by_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '影响人名字',
   `action` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '行为',
   `score_change` decimal(10,2) DEFAULT NULL COMMENT '评分变动',
   `score` decimal(10,2) DEFAULT NULL COMMENT '变动后评分',
   `status` int NOT NULL DEFAULT '1' COMMENT '审核状态0-待审核，1-审核通过',
   `create_by` bigint NOT NULL,
   `create_time` datetime NOT NULL,
   `update_by` bigint NOT NULL,
   `update_time` datetime NOT NULL,
   PRIMARY KEY (`id`) USING BTREE,
   KEY `score_id_index` (`score_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='物流企业评分明细表';