how can this method be changed to sequelize syntax? Multiple table associations
urgent.
makeupUpdateAccountInfo: function (data) {
var companyCode = ""
if (data && data.companyCode) {
companyCode = data.companyCode.toUpperCase()
}
var parameJson = {
"set": {
"a.nick_name": data.nickName,
"a.company_code": companyCode
},
"table": ["account as a", "account_session as ass"],
"where": {
"and": {
"ass.access_key": data.session,
"ass.account_id": "item:a.id"
}
}
};
return parameJson;
}
}