File: /var/www/javago-api-updates/src/models/cafe_item_addons.model.js
import Sequelize from "sequelize";
import sequelize from "../config/database.config.js";
import sequelizePaginate from "sequelize-paginate";
const cafe_item_addons = sequelize.define(
"cafe_item_addons",
{
id: {
type: Sequelize.BIGINT,
primaryKey: true,
autoIncrement: true,
allowNull: false,
},
item_id: {
type: Sequelize.BIGINT,
},
addon_id: {
type: Sequelize.BIGINT,
},
item_addon_deleted_at: {
type: Sequelize.INTEGER,
defaultValue: 0,
comment: '0-not deleted'
},
created_at: {
type: Sequelize.INTEGER(10),
defaultValue: 0
},
updated_at: {
type: Sequelize.INTEGER(10),
defaultValue: 0
},
},
{
tableName: 'cafe_item_addons',
timestamps: false,
}
);
sequelizePaginate.paginate(cafe_item_addons);
export default cafe_item_addons;