From 7d36d3d62c856c23a9f45624d7ed26d8c5ff7dbc Mon Sep 17 00:00:00 2001 From: The Arcane Brony Date: Sun, 10 Oct 2021 21:30:46 +0200 Subject: Put local types back --- util/src/entities/AuditLog.ts | 4 ++-- util/src/entities/Channel.ts | 4 ++-- util/src/entities/Message.ts | 4 ++-- util/src/entities/Relationship.ts | 4 ++-- util/src/entities/Role.ts | 2 +- util/src/entities/Sticker.ts | 8 ++++---- util/src/entities/TeamMember.ts | 4 ++-- util/src/entities/Webhook.ts | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) (limited to 'util/src/entities') diff --git a/util/src/entities/AuditLog.ts b/util/src/entities/AuditLog.ts index 4b3536b6..4b81ed6a 100644 --- a/util/src/entities/AuditLog.ts +++ b/util/src/entities/AuditLog.ts @@ -55,8 +55,8 @@ export class AuditLog extends BaseClass { @ManyToOne(() => User, (user: User) => user.id) user: User; - @Column() - action_type: number; + @Column({ type: "int" }) + action_type: AuditLogEvents; @Column({ type: "simple-json", nullable: true }) options?: { diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts index e10bd8ed..bd2e5a58 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: number; + @Column({ type: "int" }) + type: ChannelType; @OneToMany(() => Recipient, (recipient: Recipient) => recipient.channel, { cascade: true, diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts index e364c57b..63cd6ad3 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: number; + @Column({ type: "int" }) + type: MessageType; @Column({ type: "simple-json", nullable: true }) activity?: { diff --git a/util/src/entities/Relationship.ts b/util/src/entities/Relationship.ts index 2e886e71..c3592c76 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: number; + @Column({ type: "int" }) + type: RelationshipType; toPublicRelationship() { return { diff --git a/util/src/entities/Role.ts b/util/src/entities/Role.ts index 4a3dae98..9fca99a5 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 8956616e..036ff2d0 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: number; + @Column({ type: "int" }) + type: StickerType; - @Column() - format_type: number; + @Column({ type: "int" }) + format_type: StickerFormatType; } diff --git a/util/src/entities/TeamMember.ts b/util/src/entities/TeamMember.ts index 5642a211..b726e1e8 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() - membership_state: number; + @Column({ type: "int" }) + membership_state: TeamMemberState; @Column({ type: "simple-array" }) permissions: string[]; diff --git a/util/src/entities/Webhook.ts b/util/src/entities/Webhook.ts index 0d500962..89538417 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: number; + @Column({ type: "int" }) + type: WebhookType; @Column({ nullable: true }) name?: string; -- cgit 1.4.1