const { empty } = require("../Helpers/Common");
const sequelize = require("../config/dbconnection");
const Sequelize = require('sequelize')


const PartnerGroup = sequelize.define('partner_groups', {
    id: { type: Sequelize.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true },
    partner_id: { type: Sequelize.INTEGER, allowNull: false },
    group_id: { type: Sequelize.INTEGER, allowNull: false },
    added_by: { type: Sequelize.INTEGER, allowNull: false },
    timestamp: { type: Sequelize.INTEGER, allowNull: false },
    status: { type: Sequelize.INTEGER, allowNull: false },
},{timestamps:false})

const batchInsertpartnergroup=async(data)=>{
    try {
        const result = await PartnerGroup.create(data)
        return result.id
    } catch (error) {
        console.log(error)
    }
}

module.exports={
    batchInsertpartnergroup,
}