summary refs log tree commit diff
path: root/util/src/entities/RateLimit.ts
blob: fa9c32c1c006a87a017abb7d3d27d94008c9f981 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { Column, Entity } from "typeorm";
import { BaseClass } from "./BaseClass";

@Entity("rate_limits")
export class RateLimit extends BaseClass {
	@Column()
	id: "global" | "error" | string; // channel_239842397 | guild_238927349823 | webhook_238923423498

	@Column() // no relation as it also
	executor_id: string;

	@Column()
	hits: number;

	@Column()
	blocked: boolean;

	@Column()
	expires_at: Date;
}