mirror of
https://github.com/YouHaveTrouble/DiscipleOfLand.git
synced 2026-05-12 06:26:56 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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',
|
||||
}
|
||||
Reference in New Issue
Block a user