Files
DiscipleOfLand/src/entities/Item.ts
T
2023-10-03 21:57:18 +02:00

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',
}