37c8d789c29b9173f30755bc50aff4ef912c6353
[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 _0x13c4=['mailSubstatus','_previousDataValues','catch','exports','models','define','MailSubstatus','mail_substatuses','Condition','update','name'];(function(_0x3f3af1,_0x50fdfc){var _0x19cf03=function(_0x5978a2){while(--_0x5978a2){_0x3f3af1['push'](_0x3f3af1['shift']());}};_0x19cf03(++_0x50fdfc);}(_0x13c4,0x121));var _0x413c=function(_0x56dfdb,_0xbef4c0){_0x56dfdb=_0x56dfdb-0x0;var _0xf3f640=_0x13c4[_0x56dfdb];return _0xf3f640;};'use strict';var attributes=require('./mailSubstatus.attributes');module[_0x413c('0x0')]=function(_0x3eda16){var _0x4ba799=_0x3eda16[_0x413c('0x1')];return _0x3eda16[_0x413c('0x2')](_0x413c('0x3'),attributes,{'tableName':_0x413c('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x5492e4,_0xd3c2f2,_0x124738){return _0x4ba799[_0x413c('0x5')][_0x413c('0x6')]({'value':_0x5492e4[_0x413c('0x7')]},{'where':{'field':_0x413c('0x8'),'value':_0x5492e4[_0x413c('0x9')][_0x413c('0x7')]}})['then'](function(){_0x124738();})[_0x413c('0xa')](function(_0xcb9cde){_0x124738(_0xcb9cde);});}}});};