Built motion from commit b0a9a629.|2.6.33
[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 _0x73cb=['exports','MailSubstatus','Condition','name','then','./mailSubstatus.attributes'];(function(_0x34be37,_0x5eb56a){var _0x3cca7f=function(_0x229b07){while(--_0x229b07){_0x34be37['push'](_0x34be37['shift']());}};_0x3cca7f(++_0x5eb56a);}(_0x73cb,0x101));var _0xb73c=function(_0xac1121,_0x11a0af){_0xac1121=_0xac1121-0x0;var _0x34d794=_0x73cb[_0xac1121];return _0x34d794;};'use strict';var attributes=require(_0xb73c('0x0'));module[_0xb73c('0x1')]=function(_0x292bb3){var _0x35d9d8=_0x292bb3['models'];return _0x292bb3['define'](_0xb73c('0x2'),attributes,{'tableName':'mail_substatuses','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x42d885,_0x593bd6,_0x2dda00){return _0x35d9d8[_0xb73c('0x3')]['update']({'value':_0x42d885[_0xb73c('0x4')]},{'where':{'field':'mailSubstatus','value':_0x42d885['_previousDataValues'][_0xb73c('0x4')]}})[_0xb73c('0x5')](function(){_0x2dda00();})['catch'](function(_0x1f73ec){_0x2dda00(_0x1f73ec);});}}});};