1ae8069cc5692c699d7de6ccd3b32685a043a919
[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 _0x5244=['mailSubstatus','_previousDataValues','exports','define','MailSubstatus','mail_substatuses','Condition','name'];(function(_0x2e9a4f,_0x44dc78){var _0x276a54=function(_0x494420){while(--_0x494420){_0x2e9a4f['push'](_0x2e9a4f['shift']());}};_0x276a54(++_0x44dc78);}(_0x5244,0x1a2));var _0x4524=function(_0x45c3ef,_0x3373d5){_0x45c3ef=_0x45c3ef-0x0;var _0x291e25=_0x5244[_0x45c3ef];return _0x291e25;};'use strict';var attributes=require('./mailSubstatus.attributes');module[_0x4524('0x0')]=function(_0x1c7cc0){var _0x2bc235=_0x1c7cc0['models'];return _0x1c7cc0[_0x4524('0x1')](_0x4524('0x2'),attributes,{'tableName':_0x4524('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x1e0744,_0x4c82ab,_0x49ed14){return _0x2bc235[_0x4524('0x4')]['update']({'value':_0x1e0744[_0x4524('0x5')]},{'where':{'field':_0x4524('0x6'),'value':_0x1e0744[_0x4524('0x7')]['name']}})['then'](function(){_0x49ed14();})['catch'](function(_0x237ec7){_0x49ed14(_0x237ec7);});}}});};