38ffadea1f2c37b4756caa917b6f92665b9e5e74
[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 _0x1dfe=['mail_substatuses','name','mailSubstatus','_previousDataValues','then','catch','./mailSubstatus.attributes','exports','MailSubstatus'];(function(_0x18b1ab,_0x754e09){var _0x4433f7=function(_0x1128c8){while(--_0x1128c8){_0x18b1ab['push'](_0x18b1ab['shift']());}};_0x4433f7(++_0x754e09);}(_0x1dfe,0x69));var _0xe1df=function(_0x4c1ce2,_0x54fc38){_0x4c1ce2=_0x4c1ce2-0x0;var _0xf11691=_0x1dfe[_0x4c1ce2];return _0xf11691;};'use strict';var attributes=require(_0xe1df('0x0'));module[_0xe1df('0x1')]=function(_0x1f2c50){var _0x3969ce=_0x1f2c50['models'];return _0x1f2c50['define'](_0xe1df('0x2'),attributes,{'tableName':_0xe1df('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x4c7a44,_0xb71fe5,_0x4f6414){return _0x3969ce['Condition']['update']({'value':_0x4c7a44[_0xe1df('0x4')]},{'where':{'field':_0xe1df('0x5'),'value':_0x4c7a44[_0xe1df('0x6')][_0xe1df('0x4')]}})[_0xe1df('0x7')](function(){_0x4f6414();})[_0xe1df('0x8')](function(_0x50e83f){_0x4f6414(_0x50e83f);});}}});};