CREATE TABLE `ufutx_s2_partner_commissions` (
  `id` bigint(20) UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL COMMENT '订单id',
  `order_type` tinyint(3) UNSIGNED NOT NULL DEFAULT '1' COMMENT '订单类型,1=dma,2=商城',
  `order_no` varchar(255) NOT NULL COMMENT '订单号',
  `user_id` int(11) NOT NULL COMMENT '合伙人id, 即获得佣金的人',
  `payment_id` tinyint(3) UNSIGNED NOT NULL DEFAULT '1' COMMENT '支付子商户id',
  `role` tinyint(3) NOT NULL DEFAULT '1' COMMENT '合伙在此订单角色,1推荐人,2教练,3副教练,4客服',
  `type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '收益类型 1=推荐人收益 2=服务收益',
  `amount` bigint(20) NOT NULL COMMENT '佣金金额,单位:分',
  `withdrawal_id` int(11) DEFAULT NULL COMMENT '提现id, status=4之后填充',
  `unfreeze_at` timestamp NULL DEFAULT NULL COMMENT '佣金解冻时间, 至此时刻state从0变为1',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注, 如拒绝理由等',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT '0=冻结中,1=可提现,2=提现中,3=被拒,4=已提现',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='新合伙人佣金收益表';