78 lines
1.7 KiB
TypeScript
78 lines
1.7 KiB
TypeScript
/**
|
||
* 运动会记分板系统模块
|
||
*
|
||
* 此模块提供完整的运动会管理功能
|
||
* 可作为独立模块集成到更大的系统中
|
||
*/
|
||
|
||
// 模块配置
|
||
export const scoreboardModule = {
|
||
name: 'scoreboard',
|
||
version: '1.0.0',
|
||
description: '运动会记分板管理模块'
|
||
}
|
||
|
||
// 比赛类别配置
|
||
export const EVENT_CATEGORIES = {
|
||
FIELD: '田赛',
|
||
TRACK: '径赛',
|
||
TEAM: '团体赛'
|
||
} as const
|
||
|
||
// 组别配置
|
||
export const TEAM_GROUPS = {
|
||
TEACHER: '教师组',
|
||
AVIATION: '航空班组',
|
||
SPORTS: '体育班组',
|
||
CULTURE_A: '文化班甲组',
|
||
CULTURE_B: '文化班乙组'
|
||
} as const
|
||
|
||
// 项目配置
|
||
export const EVENT_TYPES = {
|
||
[EVENT_CATEGORIES.FIELD]: [
|
||
{ name: '跳高', unit: '米' },
|
||
{ name: '跳远', unit: '米' },
|
||
{ name: '掷铅球', unit: '米' }
|
||
],
|
||
[EVENT_CATEGORIES.TRACK]: [
|
||
{ name: '100m', unit: '秒' },
|
||
{ name: '200m', unit: '秒' },
|
||
{ name: '400m', unit: '秒' }
|
||
],
|
||
[EVENT_CATEGORIES.TEAM]: [
|
||
{ name: '4×100m', unit: '秒' },
|
||
{ name: '4×400m', unit: '秒' },
|
||
{ name: '20×50m', unit: '秒' },
|
||
{ name: '旱地龙舟', unit: '秒' },
|
||
{ name: '跳长绳', unit: '次' },
|
||
{ name: '折返跑', unit: '秒' }
|
||
]
|
||
}
|
||
|
||
// 积分规则
|
||
export const SCORING_RULES = {
|
||
GOLD: { rank: 1, points: 7, medal: 'gold' },
|
||
SILVER: { rank: 2, points: 5, medal: 'silver' },
|
||
BRONZE: { rank: 3, points: 3, medal: 'bronze' }
|
||
}
|
||
|
||
// API 路由
|
||
export const API_ROUTES = {
|
||
EVENTS: '/api/events',
|
||
TEAMS: '/api/teams',
|
||
RESULTS: '/api/results',
|
||
SCOREBOARD: '/api/scoreboard',
|
||
CONFIG: '/api/config',
|
||
SEED: '/api/seed'
|
||
} as const
|
||
|
||
// 页面路由
|
||
export const PAGE_ROUTES = {
|
||
HOME: '/',
|
||
EVENTS: '/events',
|
||
TEAMS: '/teams',
|
||
RESULTS: '/results',
|
||
SCOREBOARD: '/scoreboard'
|
||
} as const
|