diff options
Diffstat (limited to 'src/models/User.js')
-rw-r--r-- | src/models/User.js | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/src/models/User.js b/src/models/User.js deleted file mode 100644 index d864dde0c..000000000 --- a/src/models/User.js +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | import { observable } from 'mobx'; | ||
2 | |||
3 | export default class User { | ||
4 | id = null; | ||
5 | |||
6 | @observable email = null; | ||
7 | |||
8 | @observable firstname = null; | ||
9 | |||
10 | @observable lastname = null; | ||
11 | |||
12 | @observable organization = null; | ||
13 | |||
14 | @observable accountType = null; | ||
15 | |||
16 | @observable emailIsConfirmed = true; | ||
17 | |||
18 | // better assume it's confirmed to avoid noise | ||
19 | @observable subscription = {}; | ||
20 | |||
21 | @observable isSubscriptionOwner = false; | ||
22 | |||
23 | @observable hasSubscription = true; | ||
24 | |||
25 | @observable hadSubscription = false; | ||
26 | |||
27 | @observable beta = false; | ||
28 | |||
29 | @observable donor = {}; | ||
30 | |||
31 | @observable isDonor = false; | ||
32 | |||
33 | @observable isMiner = false; | ||
34 | |||
35 | @observable locale = false; | ||
36 | |||
37 | @observable team = {}; | ||
38 | |||
39 | constructor(data) { | ||
40 | if (!data.id) { | ||
41 | throw Error('User requires Id'); | ||
42 | } | ||
43 | |||
44 | this.id = data.id; | ||
45 | this.email = data.email || this.email; | ||
46 | this.firstname = data.firstname || this.firstname; | ||
47 | this.lastname = data.lastname || this.lastname; | ||
48 | this.organization = data.organization || this.organization; | ||
49 | this.accountType = data.accountType || this.accountType; | ||
50 | this.beta = data.beta || this.beta; | ||
51 | this.donor = data.donor || this.donor; | ||
52 | this.isDonor = data.isDonor || this.isDonor; | ||
53 | this.isMiner = data.isMiner || this.isMiner; | ||
54 | this.locale = data.locale || this.locale; | ||
55 | |||
56 | this.isSubscriptionOwner = data.isSubscriptionOwner || this.isSubscriptionOwner; | ||
57 | this.hasSubscription = data.hasSubscription || this.hasSubscription; | ||
58 | this.hadSubscription = data.hadSubscription || this.hadSubscription; | ||
59 | |||
60 | this.team = data.team || this.team; | ||
61 | } | ||
62 | } | ||