blob: 4b721b5bb37c3855e7c9a27e2a44807f441d4118 (
plain) (
blame)
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
|
import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm";
import { BaseClass } from "./BaseClass";
import { Guild } from "./Guild";
@Entity("roles")
export class Role extends BaseClass {
@Column({ nullable: true })
@RelationId((role: Role) => role.guild)
guild_id: string;
@JoinColumn({ name: "guild_id" })
@ManyToOne(() => Guild, {
onDelete: "CASCADE",
})
guild: Guild;
@Column()
color: number;
@Column()
hoist: boolean;
@Column()
managed: boolean;
@Column()
mentionable: boolean;
@Column()
name: string;
@Column()
permissions: string;
@Column()
position: number;
@Column({ nullable: true })
icon: string;
@Column({ nullable: true })
unicode_emoji: string;
@Column({ type: "simple-json", nullable: true })
tags?: {
bot_id?: string;
integration_id?: string;
premium_subscriber?: boolean;
};
}
|