/*
 Navicat Premium Dump SQL

 Source Server         : jxy-hjf-db
 Source Server Type    : MySQL
 Source Server Version : 50740 (5.7.40-log)
 Source Host           : 182.92.142.158:3306
 Source Schema         : hjfshop

 Target Server Type    : MySQL
 Target Server Version : 50740 (5.7.40-log)
 File Encoding         : 65001

 Date: 24/03/2026 11:17:55
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for eb_points_release_log
-- ----------------------------
DROP TABLE IF EXISTS `eb_points_release_log`;
CREATE TABLE `eb_points_release_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户 ID',
  `points` int(11) NOT NULL DEFAULT '0' COMMENT '积分数量（绝对值）',
  `pm` tinyint(1) NOT NULL DEFAULT '1' COMMENT '收支方向：1=收入 0=支出',
  `type` varchar(50) NOT NULL DEFAULT '' COMMENT '类型：reward_direct/reward_umbrella/release/consume',
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
  `mark` varchar(500) NOT NULL DEFAULT '' COMMENT '备注',
  `status` varchar(30) NOT NULL DEFAULT 'frozen' COMMENT '状态：frozen=冻结 released=已释放 consumed=已消费',
  `order_id` varchar(50) NOT NULL DEFAULT '' COMMENT '关联订单号（奖励来源），释放记录为空',
  `release_date` date DEFAULT NULL COMMENT '释放日期（每日释放时填写）',
  `add_time` int(11) NOT NULL DEFAULT '0' COMMENT '记录时间（Unix 时间戳）',
  PRIMARY KEY (`id`),
  KEY `idx_uid_type` (`uid`,`type`),
  KEY `idx_uid_add_time` (`uid`,`add_time`),
  KEY `idx_release_date` (`release_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='积分释放明细日志';

SET FOREIGN_KEY_CHECKS = 1;
