From f75a7bac16ea54e431077534c4842d847ec997f5 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:08:33 +1000 Subject: Use PrimaryIdColumn instead of PrimaryColumn in Invite and Category --- src/util/entities/Categories.ts | 6 +++--- src/util/entities/Invite.ts | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/util/entities/Categories.ts b/src/util/entities/Categories.ts index f12b237d..8cf1e3a4 100644 --- a/src/util/entities/Categories.ts +++ b/src/util/entities/Categories.ts @@ -1,5 +1,5 @@ -import { PrimaryColumn, Column, Entity } from "typeorm"; -import { BaseClassWithoutId } from "./BaseClass"; +import { Column, Entity } from "typeorm"; +import { BaseClassWithoutId, PrimaryIdColumn } from "./BaseClass"; // TODO: categories: // [{ @@ -19,7 +19,7 @@ import { BaseClassWithoutId } from "./BaseClass"; export class Categories extends BaseClassWithoutId { // Not using snowflake - @PrimaryColumn() + @PrimaryIdColumn() id: number; @Column({ nullable: true }) diff --git a/src/util/entities/Invite.ts b/src/util/entities/Invite.ts index 90dec92a..ad4fd6db 100644 --- a/src/util/entities/Invite.ts +++ b/src/util/entities/Invite.ts @@ -4,10 +4,9 @@ import { JoinColumn, ManyToOne, RelationId, - PrimaryColumn, } from "typeorm"; import { Member } from "./Member"; -import { BaseClassWithoutId } from "./BaseClass"; +import { BaseClassWithoutId, PrimaryIdColumn } from "./BaseClass"; import { Channel } from "./Channel"; import { Guild } from "./Guild"; import { User } from "./User"; @@ -16,7 +15,7 @@ export const PublicInviteRelation = ["inviter", "guild", "channel"]; @Entity("invites") export class Invite extends BaseClassWithoutId { - @PrimaryColumn() + @PrimaryIdColumn() code: string; @Column() -- cgit 1.4.1