-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserTypes.ts
More file actions
55 lines (46 loc) · 1.45 KB
/
Copy pathuserTypes.ts
File metadata and controls
55 lines (46 loc) · 1.45 KB
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
import { Role, Server } from "./serverTypes";
import { Job } from "./jobTypes";
import { R2File } from "./contentTypes";
export interface User {
id: string;
firstName: string;
lastName: string;
email: string;
password?: string;
servers?: Server[];
friends?: User[];
friendsOf?: User[];
friendRequestsReceived?: User[];
friendRequestsSent?: User[];
directChannels?: DirectChannel[];
directMessages?: DirectMessage[]; // Direct messages sent to this user
avatarId?: string;
avatar?: R2File;
createdAt: Date;
updatedAt: Date;
status?: string;
location?: string;
birthday?: Date;
roles?: Role[];
applications?: Job[];
portfolioCdnImages?: R2File[]; // Array of portfolio image IDs
skills: string[];
}
export interface DirectChannel {
id: string;
createdAt: Date; // Date when the direct channel was created
updatedAt: Date; // Date when the direct channel was last updated
userIds: String[];
users?: User[]; // Users that are part of this direct channel
messages?: DirectMessage[]; // Messages in this direct channel
}
export interface DirectMessage {
id: string;
directChannelId: string;
authorId: string;
author?: User;
content: string;
createdAt: Date; // Date when the message was created
updatedAt: Date; // Date when the message was last updated
DirectChannel?: DirectChannel; // The direct channel this message belongs to
}