Skip to content

Commit

Permalink
fix: sequelize
Browse files Browse the repository at this point in the history
  • Loading branch information
ImSoZRious committed Mar 30, 2024
1 parent 9ef0f9a commit 7fb22cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 36 deletions.
14 changes: 1 addition & 13 deletions apps/server/src/models/client.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,7 @@ import { sequelizeConnection } from '$/utils/database'
export class Client
extends Model<ClientAttributes, ClientInput>
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(
{
Expand Down
14 changes: 1 addition & 13 deletions apps/server/src/models/game.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,7 @@ import { GameHistory } from './history.model'

export class Game
extends Model<GameAttributes, GameInput>
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(
{
Expand Down
11 changes: 1 addition & 10 deletions apps/server/src/models/history.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,7 @@ import { Game } from './game.model'

export class GameHistory
extends Model<GameHistoryAttributes, GameHistoryInput>
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(
{
Expand Down

0 comments on commit 7fb22cc

Please sign in to comment.