1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 04:32:35 +01:00

Use PrimaryIdColumn instead of PrimaryColumn in Invite and Category

This commit is contained in:
Madeline 2022-09-28 16:08:33 +10:00
parent 6fcf0250d7
commit 4ce5ed5ad3
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
2 changed files with 5 additions and 6 deletions

View File

@ -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 })

View File

@ -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()