Built motion from commit ffdca78c.|2.6.24
[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 _0x9e24=['Condition','update','name','catch','./mailSubstatus.attributes','define','MailSubstatus','mail_substatuses'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x9e24,0xc4));var _0x49e2=function(_0x3e85a4,_0x18c3a9){_0x3e85a4=_0x3e85a4-0x0;var _0x21e7d1=_0x9e24[_0x3e85a4];return _0x21e7d1;};'use strict';var attributes=require(_0x49e2('0x0'));module['exports']=function(_0x3fcba0){var _0x20af2d=_0x3fcba0['models'];return _0x3fcba0[_0x49e2('0x1')](_0x49e2('0x2'),attributes,{'tableName':_0x49e2('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x368baf,_0x1c7694,_0x4e59c9){return _0x20af2d[_0x49e2('0x4')][_0x49e2('0x5')]({'value':_0x368baf['name']},{'where':{'field':'mailSubstatus','value':_0x368baf['_previousDataValues'][_0x49e2('0x6')]}})['then'](function(){_0x4e59c9();})[_0x49e2('0x7')](function(_0xccb69d){_0x4e59c9(_0xccb69d);});}}});};