802d784478920322b176eae5dc67c0101ad42044
[motion2.git] / server / api / mailSubstatus / mailSubstatus.model.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xbd40=['mail_substatuses','update','name','mailSubstatus','_previousDataValues','catch','./mailSubstatus.attributes','models','MailSubstatus'];(function(_0x756f4b,_0x4fe373){var _0x3106bd=function(_0x11b832){while(--_0x11b832){_0x756f4b['push'](_0x756f4b['shift']());}};_0x3106bd(++_0x4fe373);}(_0xbd40,0x126));var _0x0bd4=function(_0x4bc6f4,_0x59da5b){_0x4bc6f4=_0x4bc6f4-0x0;var _0x268d75=_0xbd40[_0x4bc6f4];return _0x268d75;};'use strict';var attributes=require(_0x0bd4('0x0'));module['exports']=function(_0x440ce0){var _0x17001f=_0x440ce0[_0x0bd4('0x1')];return _0x440ce0['define'](_0x0bd4('0x2'),attributes,{'tableName':_0x0bd4('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x12fb10,_0x1c4ff0,_0x3daf64){return _0x17001f['Condition'][_0x0bd4('0x4')]({'value':_0x12fb10[_0x0bd4('0x5')]},{'where':{'field':_0x0bd4('0x6'),'value':_0x12fb10[_0x0bd4('0x7')][_0x0bd4('0x5')]}})['then'](function(){_0x3daf64();})[_0x0bd4('0x8')](function(_0x409262){_0x3daf64(_0x409262);});}}});};