This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
scoresaber-reloadedv3/projects/common/src/player/player.ts

63 lines
1011 B
TypeScript
Raw Normal View History

2024-10-08 15:32:02 +01:00
import { PlayerHistory } from "./player-history";
2024-09-28 12:48:14 +01:00
2024-09-27 23:04:14 +01:00
export default class Player {
/**
* The ID of this player.
*/
id: string;
/**
* The name of this player.
*/
name: string;
/**
* The avatar url for this player.
*/
avatar: string;
/**
* The country of this player.
*/
country: string;
/**
* The rank of the player.
*/
rank: number;
/**
* The rank the player has in their country.
*/
countryRank: number;
/**
* The date the player joined the playform.
*/
joinedDate: Date;
constructor(
id: string,
name: string,
avatar: string,
country: string,
rank: number,
countryRank: number,
joinedDate: Date
2024-09-27 23:04:14 +01:00
) {
this.id = id;
this.name = name;
this.avatar = avatar;
this.country = country;
this.rank = rank;
this.countryRank = countryRank;
this.joinedDate = joinedDate;
}
}
2024-09-28 12:48:14 +01:00
export type StatisticChange = {
2024-10-12 05:26:30 +01:00
daily: PlayerHistory;
weekly: PlayerHistory;
monthly: PlayerHistory;
};