711740090e7bbfd6bd497f4a4aa2229447fcf636
[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 _0xdeb4=['./mailSubstatus.attributes','exports','models','define','MailSubstatus','mail_substatuses','_previousDataValues','then','catch'];(function(_0x432c74,_0x5844df){var _0x302841=function(_0x40a35c){while(--_0x40a35c){_0x432c74['push'](_0x432c74['shift']());}};_0x302841(++_0x5844df);}(_0xdeb4,0x105));var _0x4deb=function(_0x1ef47f,_0x311ac1){_0x1ef47f=_0x1ef47f-0x0;var _0x1ee13d=_0xdeb4[_0x1ef47f];return _0x1ee13d;};'use strict';var attributes=require(_0x4deb('0x0'));module[_0x4deb('0x1')]=function(_0x17389f){var _0x11b573=_0x17389f[_0x4deb('0x2')];return _0x17389f[_0x4deb('0x3')](_0x4deb('0x4'),attributes,{'tableName':_0x4deb('0x5'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x13ae3f,_0x571047,_0x494216){return _0x11b573['Condition']['update']({'value':_0x13ae3f['name']},{'where':{'field':'mailSubstatus','value':_0x13ae3f[_0x4deb('0x6')]['name']}})[_0x4deb('0x7')](function(){_0x494216();})[_0x4deb('0x8')](function(_0x468dcd){_0x494216(_0x468dcd);});}}});};