const { DataTypes } = require("sequelize"); const sequelize = require("../config/database"); const UserCollectionEntry = sequelize.define( "userCollectionEntry", { user_collection_id: { type: DataTypes.INTEGER, primaryKey: true, references: { model: "UserCollections", key: "id", }, }, entry_id: { type: DataTypes.INTEGER, primaryKey: true, references: { model: "Entries", key: "id", }, }, order: { type: DataTypes.INTEGER, }, }, { primaryKey: ["user_collection_id", "entry_id"], }, ); module.exports = UserCollectionEntry;