Athletic Press
Participation Model Whitepaper
参赛主体模型白皮书(v1.0)
1. Purpose & Scope
目的与适用范围
This document defines the core participation model used in Athletic Press (AP).
Its purpose is to:
-
Clearly distinguish individual-based and team-based participation
-
Provide a stable, extensible foundation for multiple sports
-
Prevent architectural pollution as new sports and rules are introduced
-
Serve as a long-term reference for development, review, and plugin design
This document applies to:
-
Athletic Press Core
-
All future AP sport-specific plugins (e.g. Track & Field, Football, Basketball)
-
Admin-side registration, results, and scoring systems
2. Core Design Philosophy
核心设计理念
Athletic Press is designed as a sports participation platform, not a single-sport tool.
Therefore, AP adopts the following principles:
-
Minimal core assumptions
-
Explicit separation of responsibilities
-
Composable participation entities
-
Future-proof extensibility over short-term convenience
3. Fundamental Entities
基础实体定义
3.1 Athlete (Individual)
An Athlete represents a real human participant.
Characteristics:
-
Atomic (cannot be subdivided)
-
Belongs to exactly one Unit
-
Has personal attributes (gender, grade, student number, etc.)
-
Can participate in multiple Items
Athlete is the smallest and most stable participation unit across all sports.
3.2 Unit (Organization / Team Context)
A Unit represents an organizational boundary, such as:
-
Class
-
Team
-
School
-
Department
Units are used for:
-
Data isolation
-
Permission scoping
-
Team-based limits
-
Scoring aggregation
3.3 Item (Competition Definition)
An Item defines what is being competed:
-
100m Sprint
-
Long Jump
-
4×100 Relay
-
Football Match
-
Basketball Game
Items may be:
-
Individual-based
-
Team-based
-
Sport-specific (handled by plugins)
4. Entry Model
报名模型(Entry)
An Entry represents a single participation record in an Event.
Canonical definition:
`Entry = Participant × Item × Event`
Where Participant may be:
-
an Athlete (individual participation)
-
a Combo (team / relay participation)
5. Athlete-based Participation
基于个人的参赛模型
5.1 Definition
Athlete-based participation is the default and simplest model:
-
One athlete
-
One item
-
One entry
This model is optimized for:
-
Track & Field individual events
-
Swimming
-
Physical fitness tests
-
Any sport where individuals register independently
5.2 Quick Entry System
The Quick Entry module is intentionally designed to support:
-
Athlete-based participation only
-
High-speed batch registration
-
Clear rule enforcement (per-athlete limits, per-unit limits)
Quick Entry MUST remain athlete-only.
This is a deliberate architectural constraint.
5.3 Design Rule (Mandatory)
Quick Entry shall never accept team, relay, or composite participants.
Reasons:
-
Prevent complexity explosion
-
Preserve predictable behavior
-
Avoid sport-specific branching logic
-
Maintain long-term stability
6. Combo-based Participation
基于组合的参赛模型(Combo)
6.1 Definition
A Combo represents a composite participant.
Examples:
-
4×100 relay team
-
Football team (11 players)
-
Basketball team (5 players)
-
Doubles in badminton or tennis
A Combo:
-
Is not a human
-
Acts as a virtual participant
-
Owns a list of Athletes
-
Belongs to a Unit
-
Participates as a single entity
6.2 Combo Characteristics
A Combo may enforce:
-
Fixed or variable member count
-
Gender constraints
-
Grade constraints
-
Sport-specific rules (via plugins)
6.3 Combo as Participant
In the Entry system:
`Entry.ap_entry_athlete → may reference:
– an Athlete post
– a Combo post`
From the Entry’s perspective:
-
Combo and Athlete are both Participants
-
Downstream systems operate on Entry, not on raw Athletes
7. Separation of Responsibilities
职责分离原则(关键)
|
Component |
Responsibility |
|---|---|
|
Athlete |
Individual identity |
|
Combo |
Composite participant |
|
Entry |
Participation record |
|
Quick Entry |
Fast individual registration |
|
Combo Builder |
Team composition management |
|
Sport Plugins |
Rule enforcement |
8. Why Combo Is NOT in Quick Entry
为什么 Combo 不进入快速报名
This is a strategic decision, not a technical limitation.
Allowing Combo into Quick Entry would:
-
Break the atomic assumption of Quick Entry
-
Introduce ambiguous validation logic
-
Force sport-specific branching into core workflows
-
Prevent clean plugin separation in the future
Keeping them separate ensures:
-
Cleaner core
-
Safer evolution
-
Easier maintenance
-
Real multi-sport capability
9. Multi-Sport Extensibility
多运动扩展能力
This model supports:
-
AP Core (neutral)
-
AP Track & Field
-
AP Football
-
AP Basketball
-
AP Volleyball
-
AP Fun Sports
Each sport plugin can:
-
Define Combo rules
-
Validate team composition
-
Extend scoring logic
Without modifying Core.
10. Long-term Guarantees
长期稳定性承诺
By adhering to this model, Athletic Press guarantees:
-
No breaking changes to Entry semantics
-
Stable Quick Entry behavior
-
Safe sport plugin development
-
Predictable data structure across versions
11. Summary
总结
Athletic Press distinguishes clearly between:
-
Individuals (Athletes)
-
Composite Participants (Combos)
This separation is:
-
Intentional
-
Enforced
-
Fundamental
Athlete-based participation is fast and simple.
Combo-based participation is powerful and extensible.
They must never be confused.
Document Version: 1.0
Status: Active
Applies From: AP Core v1.0+
发表回复