blob: ceea4a05e0309723af14833ce759560aa6ba4127 (
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
|
import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
import { BaseClass } from "./BaseClass";
import { Guild } from "./Guild";
import { User } from "./User";
@Entity("bans")
export class Ban extends BaseClass {
@Column()
user_id: string;
@JoinColumn({ name: "user_id" })
@ManyToOne(() => User, (user: User) => user.id)
user: User;
@Column()
guild_id: string;
@JoinColumn({ name: "guild_id" })
@ManyToOne(() => Guild, (guild: Guild) => guild.id)
guild: Guild;
@Column()
executor_id: string;
@JoinColumn({ name: "executor_id" })
@ManyToOne(() => User, (user: User) => user.id)
executor: User;
@Column()
ip: string;
@Column()
reason?: string;
}
|