From 7c271912022dcd2ce822c268c92034d0844a2e94 Mon Sep 17 00:00:00 2001 From: baz Date: Mon, 18 Dec 2023 21:55:04 +0000 Subject: [PATCH] Refactor models --- models/beatenGames.js | 11 +---------- models/games.js | 3 +-- models/users.js | 3 +-- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/models/beatenGames.js b/models/beatenGames.js index 27e60e8..f94d92b 100644 --- a/models/beatenGames.js +++ b/models/beatenGames.js @@ -1,16 +1,7 @@ module.exports = (sequelize, DataTypes) => { return sequelize.define('beatenGames', { - id: { - type: DataTypes.INTEGER, - primaryKey: true, - autoIncrement: true, - }, - user_id: DataTypes.INTEGER, - game_id: DataTypes.STRING, - date_created: DataTypes.DATE, - date_last_modified: DataTypes.DATE, }, { - timestamps: false, + timestamps: true, }); }; diff --git a/models/games.js b/models/games.js index b227a29..d864655 100644 --- a/models/games.js +++ b/models/games.js @@ -1,8 +1,7 @@ module.exports = (sequelize, DataTypes) => { return sequelize.define('games', { - id: { + igdb_id: { type: DataTypes.INTEGER, - primaryKey: true, }, name: { type: DataTypes.STRING, diff --git a/models/users.js b/models/users.js index 401572d..6d06f35 100644 --- a/models/users.js +++ b/models/users.js @@ -1,8 +1,7 @@ module.exports = (sequelize, DataTypes) => { return sequelize.define('users', { - user_id: { + discord_id: { type: DataTypes.STRING, - primaryKey: true, }, username: { type: DataTypes.STRING,