-
Notifications
You must be signed in to change notification settings - Fork 1
/
User.ts
41 lines (39 loc) 路 1.13 KB
/
User.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
import { QuizCreatedByData } from "../typings/QuizCreatedByData";
import { QuizCreatedByGoogleData } from "../typings/QuizCreatedByGoogleData";
import { QuizCreatedByLocalData } from "../typings/QuizCreatedByLocalData";
/**
* @class
* @description Represents a User from the API
*/
export default class User {
local: QuizCreatedByLocalData;
google: QuizCreatedByGoogleData;
student: string | null;
deactivated: boolean;
deleted: boolean;
_id: string;
firstName: string;
lastName: string;
media: string;
occupation: string;
country: string;
id: string;
/**
* @constructor
* @param {QuizCreatedByData}
*/
constructor(data: QuizCreatedByData) {
this.local = data.local;
this.google = data.google;
this.student = data.student;
this.deactivated = data.deactivated;
this.deleted = data.deleted;
this._id = data._id;
this.firstName = data.firstName;
this.lastName = data.lastName;
this.media = data.media;
this.occupation = data.occupation;
this.country = data.country;
this.id = data.id;
}
}