24 lines
590 B
TypeScript
24 lines
590 B
TypeScript
import { LeaderboardConfig } from '../aggregates/leaderboard-config/leaderboard-config.aggregate';
|
|
|
|
/**
|
|
* 龙虎榜配置仓储接口
|
|
*/
|
|
export interface ILeaderboardConfigRepository {
|
|
/**
|
|
* 保存配置
|
|
*/
|
|
save(config: LeaderboardConfig): Promise<void>;
|
|
|
|
/**
|
|
* 根据配置键查找
|
|
*/
|
|
findByKey(configKey: string): Promise<LeaderboardConfig | null>;
|
|
|
|
/**
|
|
* 获取全局配置(如果不存在则创建默认配置)
|
|
*/
|
|
getGlobalConfig(): Promise<LeaderboardConfig>;
|
|
}
|
|
|
|
export const LEADERBOARD_CONFIG_REPOSITORY = Symbol('ILeaderboardConfigRepository');
|