-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverTypes.ts
More file actions
61 lines (57 loc) · 1.19 KB
/
Copy pathserverTypes.ts
File metadata and controls
61 lines (57 loc) · 1.19 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
56
57
58
59
60
61
import { User } from "./userTypes";
import { Job } from "./jobTypes";
import { R2File } from "./contentTypes";
export interface Server {
id: string;
name: string;
createdAt?: Date;
updatedAt?: Date;
ownerId: string;
owner?: User;
website: string;
members?: User[];
channels?: Channel[];
invites: string[];
icon?: R2File;
iconId?: string;
banner?: R2File;
bannerId?: string;
description: string;
onlineMembers?: User[];
roles?: Role[];
jobListings?: Job[];
tags: string[];
private: boolean;
}
export interface Channel {
id: string;
name: string;
description: string;
createdAt: Date;
updatedAt: Date;
serverId: string;
server?: Server;
messages?: Message[];
permissionRequired: number;
}
export interface Message {
id: string;
content: string;
createdAt: Date;
updatedAt: Date;
authorId: string;
author?: User;
channelId: string;
channel?: Channel;
file?: R2File | null;
}
export interface Role {
id: string;
name: string;
permissions: number;
serverId: string;
createdAt: Date;
updatedAt: Date;
server?: Server;
users?: User[];
}