Change enums to numbers

This commit is contained in:
The Arcane Brony
2021-10-10 20:34:45 +02:00
parent d5fcad3738
commit a11d693f43
8 changed files with 17 additions and 20 deletions
+2 -5
View File
@@ -55,11 +55,8 @@ export class AuditLog extends BaseClass {
@ManyToOne(() => User, (user: User) => user.id)
user: User;
@Column({
type: "simple-enum",
enum: AuditLogEvents,
})
action_type: AuditLogEvents;
@Column()
action_type: number;
@Column({ type: "simple-json", nullable: true })
options?: {
+2 -2
View File
@@ -39,8 +39,8 @@ export class Channel extends BaseClass {
@Column({ type: "text", nullable: true })
icon?: string | null;
@Column({ type: "simple-enum", enum: ChannelType })
type: ChannelType;
@Column()
type: number;
@OneToMany(() => Recipient, (recipient: Recipient) => recipient.channel, {
cascade: true,
+2 -2
View File
@@ -148,8 +148,8 @@ export class Message extends BaseClass {
@Column({ nullable: true })
pinned?: boolean;
@Column({ type: "simple-enum", enum: MessageType })
type: MessageType;
@Column()
type: number;
@Column({ type: "simple-json", nullable: true })
activity?: {
+2 -2
View File
@@ -35,8 +35,8 @@ export class Relationship extends BaseClass {
@Column({ nullable: true })
nickname?: string;
@Column({ type: "simple-enum", enum: RelationshipType })
type: RelationshipType;
@Column()
type: number;
toPublicRelationship() {
return {
+1 -1
View File
@@ -36,7 +36,7 @@ export class Role extends BaseClass {
@Column()
position: number;
@Column({ type: "simple-json", nullable: true })
@Column({ type: "simple-json", nullable: true, })
tags?: {
bot_id?: string;
integration_id?: string;
+4 -4
View File
@@ -36,9 +36,9 @@ export class Sticker extends BaseClass {
})
guild?: Guild;
@Column({ type: "simple-enum", enum: StickerType })
type: StickerType;
@Column()
type: number;
@Column({ type: "simple-enum", enum: StickerFormatType })
format_type: StickerFormatType;
@Column()
format_type: number;
}
+2 -2
View File
@@ -9,8 +9,8 @@ export enum TeamMemberState {
@Entity("team_members")
export class TeamMember extends BaseClass {
@Column({ type: "simple-enum", enum: TeamMemberState })
membership_state: TeamMemberState;
@Column()
membership_state: number;
@Column({ type: "simple-array" })
permissions: string[];
+2 -2
View File
@@ -12,8 +12,8 @@ export enum WebhookType {
@Entity("webhooks")
export class Webhook extends BaseClass {
@Column({ type: "simple-enum", enum: WebhookType })
type: WebhookType;
@Column()
type: number;
@Column({ nullable: true })
name?: string;