From 7fb22cc82c73619e721024993b884c7147866e62 Mon Sep 17 00:00:00 2001 From: ImSoZRious <30285202+ImSoZRious@users.noreply.github.com> Date: Sat, 30 Mar 2024 19:44:07 +0700 Subject: [PATCH] fix: sequelize --- apps/server/src/models/client.model.ts | 14 +------------- apps/server/src/models/game.model.ts | 14 +------------- apps/server/src/models/history.model.ts | 11 +---------- 3 files changed, 3 insertions(+), 36 deletions(-) diff --git a/apps/server/src/models/client.model.ts b/apps/server/src/models/client.model.ts index 14de179..acc30ca 100644 --- a/apps/server/src/models/client.model.ts +++ b/apps/server/src/models/client.model.ts @@ -5,19 +5,7 @@ import { sequelizeConnection } from '$/utils/database' export class Client extends Model implements ClientAttributes -{ - public id!: string - public sid!: string - public fid!: string - public cid!: string - public isSuspended!: boolean - public ipAddr!: string - public name!: string - - public readonly createdAt!: Date - public readonly updatedAt!: Date - public readonly deletedAt!: Date -} +{ } Client.init( { diff --git a/apps/server/src/models/game.model.ts b/apps/server/src/models/game.model.ts index 8887a95..64a1b7c 100644 --- a/apps/server/src/models/game.model.ts +++ b/apps/server/src/models/game.model.ts @@ -5,19 +5,7 @@ import { GameHistory } from './history.model' export class Game extends Model - implements GameAttributes { - public id!: string - public title!: string - public description!: string - public open!: boolean - public actions!: { key: string; image: string }[] - public image!: string - public winner!: { key: string; total_vote: number } - - public readonly createdAt!: Date - public readonly updatedAt!: Date - public readonly deletedAt!: Date -} + implements GameAttributes { } Game.init( { diff --git a/apps/server/src/models/history.model.ts b/apps/server/src/models/history.model.ts index 79ee76a..0085984 100644 --- a/apps/server/src/models/history.model.ts +++ b/apps/server/src/models/history.model.ts @@ -15,16 +15,7 @@ import { Game } from './game.model' export class GameHistory extends Model - implements GameHistoryAttributes { - public game_id!: string - public player_id!: string - public key!: string - public vote!: number - - public readonly createdAt!: Date - public readonly updatedAt!: Date - public readonly deletedAt!: Date -} + implements GameHistoryAttributes { } GameHistory.init( {