forked from LeetCode-OpenSource/vscode-leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLeetCodeNode.ts
51 lines (39 loc) · 1.1 KB
/
LeetCodeNode.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (c) jdneo. All rights reserved.
// Licensed under the MIT license.
import { IProblem, ProblemState } from "../shared";
export class LeetCodeNode {
constructor(private data: IProblem, private parentNodeName: string, private isProblemNode: boolean = true) { }
public get locked(): boolean {
return this.data.locked;
}
public get name(): string {
return this.data.name;
}
public get state(): ProblemState {
return this.data.state;
}
public get id(): string {
return this.data.id;
}
public get passRate(): string {
return this.data.passRate;
}
public get difficulty(): string {
return this.data.difficulty;
}
public get tags(): string[] {
return this.data.tags;
}
public get companies(): string[] {
return this.data.companies;
}
public get isFavorite(): boolean {
return this.data.isFavorite;
}
public get isProblem(): boolean {
return this.isProblemNode;
}
public get parentName(): string {
return this.parentNodeName;
}
}