16_20240704.sql 2.1 KB

123456789101112131415161718192021
  1. CREATE TABLE `distri_pt_daily_bill` (
  2. `id` bigint NOT NULL AUTO_INCREMENT COMMENT '账单编号',
  3. `price` bigint NOT NULL DEFAULT '0' COMMENT '金额,单位:分',
  4. `received_price` bigint NOT NULL DEFAULT '0' COMMENT '确收金额,单位:分',
  5. `order_count` bigint NOT NULL DEFAULT '0' COMMENT '订单数,默认为0',
  6. `refund_price` bigint NOT NULL DEFAULT '0' COMMENT '退款金额, 单位: 分',
  7. `integral` bigint NOT NULL DEFAULT '0' COMMENT '积分',
  8. `received_integral` bigint NOT NULL DEFAULT '0' COMMENT '确收积分',
  9. `refund_integral` bigint NOT NULL DEFAULT '0' COMMENT '退款积分',
  10. `order_calc_time` date NOT NULL COMMENT '订单所属日期',
  11. `order_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '订单ID列表,文本类型',
  12. `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '创建者',
  13. `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  14. `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '更新者',
  15. `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  16. `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
  17. PRIMARY KEY (`id`) USING BTREE
  18. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='平台每日账单统计表';
  19. ALTER TABLE distri_daily_bill
  20. ADD COLUMN `pt_daily_bill_id` bigint NOT NULL default b'0' COMMENT '平台每日账单表id';