Files
cai-server/doc/20251209.sql
2025-12-10 14:04:51 +08:00

35 lines
2.1 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ALTER TABLE cai_point_record_log
ADD COLUMN one_join tinyint default 1 not null comment '是否参与分销';
ALTER TABLE cai_point_record_log
ADD COLUMN trace_id varchar(100) default null comment '链路ID';
CREATE TABLE `cai_point_change_log`
(
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '子账户ID',
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
`usercode` varchar(100) NOT NULL COMMENT '用户',
`message` varchar(100) NOT NULL COMMENT '账户明细说明',
`tar_user_id` bigint DEFAULT NULL COMMENT '目标ID用户、抽奖ID',
`tar_usercode` varchar(20) DEFAULT NULL COMMENT '目标用户Code有用户才有用',
`tar_name` varchar(255) DEFAULT NULL COMMENT '目标名称,用户名称,抽奖名称',
`tar_price` bigint DEFAULT NULL COMMENT '礼物价值',
`tar_img` varchar(255) DEFAULT NULL COMMENT '目标提前缓存的',
`tar_json` JSON DEFAULT NULL COMMENT '目标额外字段',
`change_value` bigint NOT NULL DEFAULT '0.00' COMMENT '变化值,为正 或者为负',
`operate_ip` varchar(15) DEFAULT '' COMMENT '操作IP',
`is_admin` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否为后台用户手动调整',
`trace_link_type` varchar(36) DEFAULT NULL COMMENT '跟踪类型 1-充值 2-分销 3-抽奖',
`trace_id` varchar(50) DEFAULT NULL COMMENT '跟踪ID 订单号-礼物ID',
`give_flag` tinyint NOT NULL DEFAULT '0' COMMENT '是否兑换',
`give_time` datetime comment '兑换时间',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `user_id` (`user_id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = DYNAMIC COMMENT ='积分记录';