SpaceNinjaServer/src/types/leaderboardTypes.ts
Sainan a12e5968da feat: race leaderboards (#1314)
Initial leaderboard system. Currently only tracking races, tho.

Reviewed-on: OpenWF/SpaceNinjaServer#1314
2025-03-25 03:25:58 -07:00

18 lines
380 B
TypeScript

import { Types } from "mongoose";
export interface ILeaderboardEntryDatabase {
leaderboard: string;
ownerId: Types.ObjectId;
displayName: string;
score: number;
guildId?: Types.ObjectId;
expiry: Date;
}
export interface ILeaderboardEntryClient {
_id: string; // owner id
s: number; // score
r: number; // rank
n: string; // displayName
}