Built motion from commit 639a1a7f.|2.6.19
[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 _0x80a4=['mailSubstatus','_previousDataValues','then','catch','./mailSubstatus.attributes','define','mail_substatuses','Condition','update','name'];(function(_0x93eeaf,_0x24f92b){var _0x3d2a7a=function(_0x4727ad){while(--_0x4727ad){_0x93eeaf['push'](_0x93eeaf['shift']());}};_0x3d2a7a(++_0x24f92b);}(_0x80a4,0x1e4));var _0x480a=function(_0xe66b90,_0x234632){_0xe66b90=_0xe66b90-0x0;var _0x104441=_0x80a4[_0xe66b90];return _0x104441;};'use strict';var attributes=require(_0x480a('0x0'));module['exports']=function(_0x102f30){var _0x9e1c41=_0x102f30['models'];return _0x102f30[_0x480a('0x1')]('MailSubstatus',attributes,{'tableName':_0x480a('0x2'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x20d885,_0x3b4971,_0x514a00){return _0x9e1c41[_0x480a('0x3')][_0x480a('0x4')]({'value':_0x20d885[_0x480a('0x5')]},{'where':{'field':_0x480a('0x6'),'value':_0x20d885[_0x480a('0x7')][_0x480a('0x5')]}})[_0x480a('0x8')](function(){_0x514a00();})[_0x480a('0x9')](function(_0x45dedf){_0x514a00(_0x45dedf);});}}});};