package common

import "time"

// Redis 相关常量
const (
	// RedisTokenPrefix Redis中Token前缀
	RedisTokenPrefix = "login:token:"
	// RedisTokenExpire Token过期时间
	RedisTokenExpire = 24 * time.Hour

	// RedisUserScorePrefix Redis中用户成绩前缀
	RedisUserScorePrefix = "user:score:"
	// RedisUserScoreExpire 用户成绩过期时间
	RedisUserScoreExpire = 8 * time.Hour
)

// HTTP/Context 相关常量
const (
	// ContextUserKey 上下文中存储用户信息的key
	ContextUserKey = "loginUser"
	// TokenHeader 请求头中Token的key
	// "X-Access-Token"
	TokenHeader = "Authorization"
	// HeaderTokenPrefix Token前缀 (如有需要)
	HeaderTokenPrefix = "Bearer "
)

// 业务状态常量
const (
	StateActive   = "1" // 使用中
	StateInactive = "0" // 未使用/已删除
	StateHistory  = "2" // 历史记录
)

// 数值常量
const (
	Number0    = 0
	Number0p75 = 0.75
	Number0p5  = 0.5
	Number5    = 5
	Number7p5  = 7.5
	Number100  = 100
)

// 数据类型常量
const (
	TypeNormal = "1" // 普通类
	TypeArt    = "2" // 艺术类

	// YxConstant 相关常量
	NowYear = "2026"

	// 录取方式常量
	CulturalControlLineGuo     = "文线专排"
	SpecialControlLineGuo      = "专过文排"
	CulturalControlLineGuoMain = "文过专排主科"

	W1Z1    = "文*1+专*1"
	W1JiaZ1 = "文+专"
)

var (
	OldYearList     = []string{"2025", "2024"}
	ShowOldYearList = []string{"2025", "2024", "2023"}
)
