db065b97aadc76f6b3ffebd635dacbbb60d233cb
[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 _0x0bbe=['name','./mailSubstatus.attributes','exports','models','define','MailSubstatus','mail_substatuses','_previousDataValues'];(function(_0x3dacec,_0x52822a){var _0x53abd4=function(_0x1ef55c){while(--_0x1ef55c){_0x3dacec['push'](_0x3dacec['shift']());}};_0x53abd4(++_0x52822a);}(_0x0bbe,0xc9));var _0xe0bb=function(_0xa11cd3,_0x3a3af1){_0xa11cd3=_0xa11cd3-0x0;var _0xa085b6=_0x0bbe[_0xa11cd3];return _0xa085b6;};'use strict';var attributes=require(_0xe0bb('0x0'));module[_0xe0bb('0x1')]=function(_0x27f54e){var _0x2920a7=_0x27f54e[_0xe0bb('0x2')];return _0x27f54e[_0xe0bb('0x3')](_0xe0bb('0x4'),attributes,{'tableName':_0xe0bb('0x5'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x36768c,_0x5ab2f3,_0x4a9ef3){return _0x2920a7['Condition']['update']({'value':_0x36768c['name']},{'where':{'field':'mailSubstatus','value':_0x36768c[_0xe0bb('0x6')][_0xe0bb('0x7')]}})['then'](function(){_0x4a9ef3();})['catch'](function(_0x53d62a){_0x4a9ef3(_0x53d62a);});}}});};