Built motion from commit 4c281f94.|2.6.31
[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 _0xe806=['mailSubstatus','name','./mailSubstatus.attributes','models','define','mail_substatuses','update'];(function(_0x26c4d0,_0x461b33){var _0x471dc5=function(_0x48bd15){while(--_0x48bd15){_0x26c4d0['push'](_0x26c4d0['shift']());}};_0x471dc5(++_0x461b33);}(_0xe806,0x113));var _0x6e80=function(_0xb9e732,_0x529789){_0xb9e732=_0xb9e732-0x0;var _0x56ec61=_0xe806[_0xb9e732];return _0x56ec61;};'use strict';var attributes=require(_0x6e80('0x0'));module['exports']=function(_0x170709){var _0x65f4a=_0x170709[_0x6e80('0x1')];return _0x170709[_0x6e80('0x2')]('MailSubstatus',attributes,{'tableName':_0x6e80('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x4961dd,_0x1f971f,_0x427bcf){return _0x65f4a['Condition'][_0x6e80('0x4')]({'value':_0x4961dd['name']},{'where':{'field':_0x6e80('0x5'),'value':_0x4961dd['_previousDataValues'][_0x6e80('0x6')]}})['then'](function(){_0x427bcf();})['catch'](function(_0x240b2d){_0x427bcf(_0x240b2d);});}}});};