-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.ts
60 lines (53 loc) · 1.09 KB
/
models.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
52
53
54
55
56
57
58
59
60
export interface User {
_id: string;
firstName: string;
lastName: string;
birthdate: Date;
email: string;
phoneNumber?: string;
status: "unverified" | "verified";
gender: boolean;
}
export interface FestivalUser {
_id: string;
user: User;
festival: Festival;
balance: number;
role: Role;
imageUrl?: string;
}
export interface Festival {
_id: string;
name: string;
description?: string;
location?: string;
}
export type Role = "visitor" | "employee" | "organisator";
export type PaymentStatus =
| "insufficientBalance"
| "insufficientAge"
| "accepted";
export interface Payment {
_id: string;
amount: number;
description?: string;
festival: Festival;
festivalUser: FestivalUser;
status: PaymentStatus;
}
export interface QRCode {
_id: string;
user: FestivalUser;
}
export interface Response<T> {
status: number;
message: string;
data: T | null;
errors?: {
[param: string]: {
message: string;
debug?: string;
};
};
version: string;
}