summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-15 00:03:19 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-15 00:03:19 +0200
commitfb3f957f3027a0d6c7636dbd06edb6a4803c6937 (patch)
tree7153383ae75c598a29c47a1cb6ae3d7df3a2551c /util
parent:bug: fix message sticker sending (diff)
downloadserver-fb3f957f3027a0d6c7636dbd06edb6a4803c6937.tar.xz
:bug: fix sticker packs
Diffstat (limited to 'util')
-rw-r--r--util/src/entities/StickerPack.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/src/entities/StickerPack.ts b/util/src/entities/StickerPack.ts
index b80fa9c7..ec8c69a2 100644
--- a/util/src/entities/StickerPack.ts
+++ b/util/src/entities/StickerPack.ts
@@ -1,8 +1,8 @@
-import { Column, Entity, JoinColumn, OneToMany, OneToOne, RelationId } from "typeorm";
+import { Column, Entity, JoinColumn, ManyToOne, OneToMany, OneToOne, RelationId } from "typeorm";
 import { Sticker } from ".";
 import { BaseClass } from "./BaseClass";
 
-@Entity("stickers")
+@Entity("sticker_packs")
 export class StickerPack extends BaseClass {
 	@Column()
 	name: string;
@@ -13,7 +13,7 @@ export class StickerPack extends BaseClass {
 	@Column({ nullable: true })
 	banner_asset_id?: string;
 
-	@OneToMany(() => Sticker, (sticker: Sticker) => sticker.pack_id, {
+	@OneToMany(() => Sticker, (sticker: Sticker) => sticker.pack, {
 		cascade: true,
 		orphanedRowAction: "delete",
 	})
@@ -25,7 +25,7 @@ export class StickerPack extends BaseClass {
 	@RelationId((pack: StickerPack) => pack.cover_sticker)
 	cover_sticker_id?: string;
 
-	@OneToOne(() => Sticker, { nullable: true })
+	@ManyToOne(() => Sticker, { nullable: true })
 	@JoinColumn()
 	cover_sticker?: Sticker;
 }