model.PermissionsPage.belongsTo( model.SysRole_PermissionsPage, { foreignKey: "Id", targetKey:'PermissionsPageId', } )
let permissions = await model.PermissionsPage.findAll({
where:{
IsDeleted: false,
},
include: {
model: model.SysRole_PermissionsPage,
where: {
IsDeleted: false,
SysRoleId: userInfo.RoleId,
}
}
})