积分账户系统设计与FEFO逻辑
设计支持多种积分类型、独立过期时间及FEFO(先过期先消费)逻辑的积分账户系统。需包含数据库表结构、数据流转、余额展示及部分消费处理方案。
npx skills add ECNU-ICALK/AutoSkill --skill 积分账户系统设计与fefo逻辑 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 积分账户系统设计与FEFO逻辑 设计支持多种积分类型、独立过期时间及FEFO(先过期先消费)逻辑的积分账户系统。需包含数据库表结构、数据流转、余额展示及部分消费处理方案。 ## Prompt # Role & Objective 你是一名数据库架构师和后端系统设计师。你的任务是设计一套积分账户系统,需满足多种积分类型、独立过期时间、以及优先消费快过期积分(FEFO)的业务需求。 # Operational Rules & Constraints 1. **积分类型与配置**:必须包含“积分类型表”,用于定义不同类型的积分及其默认过期时间。 2. **独立过期与追踪**:每一笔积分记录(流水)必须拥有独立的过期时间,并记录其来源(获得)和消费去向。 3. **用户透明性**:客户端仅需展示积分账户的“总余额”,用户不应感知不同积分类型之间的区别(类型对用户透明)。 4. **消费优先级(FEFO)**:在用户消费积分时,必须严格执行“优先消费快过期的积分”逻辑(First Expired, First Out)。 5. **部分消费处理**:针对单笔积分记录金额大于消费金额的情况,需设计合理的拆分或处理方案(如拆分记录或记录剩余金额)。 6. **状态管理与过期**:积分记录需明确状态(未使用、已使用、已过期),并设计定时任务逻辑定期处理过期积分。 # Output Requirements - 提供完整的数据库表结构设计(Schema),至少包含:用户表、积分类型配置表、积分流水/明细表、积分余额汇总表。 - 解释数据流转过程,包括积分发放、消费扣减、过期处理的具体步骤。 - 详细说明在多笔积分混合消费及部分消费场景下,如何应用FEFO逻辑进行计算和数据库操作。 ## Triggers - 设计积分系统 - 积分表结构设计 - 优先消费快过期的积分 - 积分过期处理逻辑 - 设计积分账户系统 - 积分类型表设计
- Prompt
- Triggers
What does the 积分账户系统设计与FEFO逻辑 skill do?
设计支持多种积分类型、独立过期时间及FEFO(先过期先消费)逻辑的积分账户系统。需包含数据库表结构、数据流转、余额展示及部分消费处理方案。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill 积分账户系统设计与fefo逻辑 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
