CREATE TABLE IF NOT EXISTS `user_freight_sub_seller_relation` (
  `id` bigint NOT NULL COMMENT '主键标识',
  `sys_origin` varchar(32) NOT NULL COMMENT '来源系统',
  `parent_freight_id` bigint NOT NULL COMMENT '超级经销商 freight balance id',
  `parent_user_id` bigint NOT NULL COMMENT '超级经销商用户 id',
  `child_user_id` bigint NOT NULL COMMENT '子 coin seller 用户 id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_user` bigint DEFAULT NULL COMMENT '创建人',
  `update_user` bigint DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_sys_origin_child_user_id` (`sys_origin`, `child_user_id`),
  KEY `idx_sys_origin_parent_user_id` (`sys_origin`, `parent_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='超级经销商子 coin seller 关系';
