mirror of
https://github.com/YouHaveTrouble/DiscipleOfLand.git
synced 2026-05-12 06:26:56 +00:00
20 lines
405 B
TypeScript
20 lines
405 B
TypeScript
export default class Item {
|
|
|
|
readonly id: string;
|
|
readonly name: string;
|
|
readonly level: number;
|
|
readonly scripType: ScripType;
|
|
|
|
constructor(id: string, data: any) {
|
|
this.id = id;
|
|
this.name = data?.name;
|
|
this.level = data?.level;
|
|
this.scripType = data?.scripType ? ScripType[data.scripType.toUpperCase()] : null;
|
|
}
|
|
|
|
}
|
|
|
|
enum ScripType {
|
|
WHITE = 'white',
|
|
PURPLE = 'purple',
|
|
} |