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
|
import { Schema, model, Types, Document } from "mongoose";
export interface Role extends Document {
id: bigint;
color: number;
hoist: boolean;
managed: boolean;
mentionable: boolean;
name: string;
permissions: bigint;
position: number;
tags?: {
bot_id?: bigint;
};
}
export const RoleSchema = new Schema({
id: Types.Long,
color: Number,
hoist: Boolean,
managed: Boolean,
mentionable: Boolean,
name: String,
permissions: Types.Long,
position: Number,
tags: {
bot_id: Types.Long,
},
});
export const RoleModel = model<Role>("Role", RoleSchema, "roles");
|