summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorThe Arcane Brony <myrainbowdash949@gmail.com>2021-10-10 20:34:45 +0200
committerThe Arcane Brony <myrainbowdash949@gmail.com>2021-10-10 20:34:45 +0200
commita11d693f434eb772836f93e6b5bcaac3cc409ec5 (patch)
tree5e4bd8bb484fe066e8b3ad339dcbbcabb066875f /util
parentforgot to fix primary columns on invites (diff)
downloadserver-a11d693f434eb772836f93e6b5bcaac3cc409ec5.tar.xz
Change enums to numbers
Diffstat (limited to 'util')
-rw-r--r--util/src/entities/AuditLog.ts7
-rw-r--r--util/src/entities/Channel.ts4
-rw-r--r--util/src/entities/Message.ts4
-rw-r--r--util/src/entities/Relationship.ts4
-rw-r--r--util/src/entities/Role.ts2
-rw-r--r--util/src/entities/Sticker.ts8
-rw-r--r--util/src/entities/TeamMember.ts4
-rw-r--r--util/src/entities/Webhook.ts4
8 files changed, 17 insertions, 20 deletions
diff --git a/util/src/entities/AuditLog.ts b/util/src/entities/AuditLog.ts
index ae9feb76..4b3536b6 100644
--- a/util/src/entities/AuditLog.ts
+++ b/util/src/entities/AuditLog.ts
@@ -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?: {
diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts
index 51d8b026..e10bd8ed 100644
--- a/util/src/entities/Channel.ts
+++ b/util/src/entities/Channel.ts
@@ -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,
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts
index c7f7a1d1..e364c57b 100644
--- a/util/src/entities/Message.ts
+++ b/util/src/entities/Message.ts
@@ -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?: {
diff --git a/util/src/entities/Relationship.ts b/util/src/entities/Relationship.ts
index e016b36b..2e886e71 100644
--- a/util/src/entities/Relationship.ts
+++ b/util/src/entities/Relationship.ts
@@ -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 {
diff --git a/util/src/entities/Role.ts b/util/src/entities/Role.ts
index 9fca99a5..4a3dae98 100644
--- a/util/src/entities/Role.ts
+++ b/util/src/entities/Role.ts
@@ -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;
diff --git a/util/src/entities/Sticker.ts b/util/src/entities/Sticker.ts
index ab224d1d..8956616e 100644
--- a/util/src/entities/Sticker.ts
+++ b/util/src/entities/Sticker.ts
@@ -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;
 }
diff --git a/util/src/entities/TeamMember.ts b/util/src/entities/TeamMember.ts
index bdfdccf0..5642a211 100644
--- a/util/src/entities/TeamMember.ts
+++ b/util/src/entities/TeamMember.ts
@@ -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[];
diff --git a/util/src/entities/Webhook.ts b/util/src/entities/Webhook.ts
index 9d8609ae..0d500962 100644
--- a/util/src/entities/Webhook.ts
+++ b/util/src/entities/Webhook.ts
@@ -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;