Refactor models

This commit is contained in:
baz 2023-12-18 21:55:04 +00:00
parent e2d3881cce
commit 7c27191202
3 changed files with 3 additions and 14 deletions

View File

@ -1,16 +1,7 @@
module.exports = (sequelize, DataTypes) => { module.exports = (sequelize, DataTypes) => {
return sequelize.define('beatenGames', { 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,
}); });
}; };

View File

@ -1,8 +1,7 @@
module.exports = (sequelize, DataTypes) => { module.exports = (sequelize, DataTypes) => {
return sequelize.define('games', { return sequelize.define('games', {
id: { igdb_id: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
primaryKey: true,
}, },
name: { name: {
type: DataTypes.STRING, type: DataTypes.STRING,

View File

@ -1,8 +1,7 @@
module.exports = (sequelize, DataTypes) => { module.exports = (sequelize, DataTypes) => {
return sequelize.define('users', { return sequelize.define('users', {
user_id: { discord_id: {
type: DataTypes.STRING, type: DataTypes.STRING,
primaryKey: true,
}, },
username: { username: {
type: DataTypes.STRING, type: DataTypes.STRING,