0bccbf9faf40428becf3a5f78adb62bfb639c58f
[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 _0x9447=['mail_substatuses','Condition','mailSubstatus','_previousDataValues','./mailSubstatus.attributes','exports','define','MailSubstatus'];(function(_0x1a4b4a,_0x26b892){var _0x50d7d9=function(_0x3dd5b5){while(--_0x3dd5b5){_0x1a4b4a['push'](_0x1a4b4a['shift']());}};_0x50d7d9(++_0x26b892);}(_0x9447,0x164));var _0x7944=function(_0x347553,_0x4a84ee){_0x347553=_0x347553-0x0;var _0x231841=_0x9447[_0x347553];return _0x231841;};'use strict';var attributes=require(_0x7944('0x0'));module[_0x7944('0x1')]=function(_0x59600b){var _0xd36058=_0x59600b['models'];return _0x59600b[_0x7944('0x2')](_0x7944('0x3'),attributes,{'tableName':_0x7944('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x252600,_0x2f99e2,_0x1540b5){return _0xd36058[_0x7944('0x5')]['update']({'value':_0x252600['name']},{'where':{'field':_0x7944('0x6'),'value':_0x252600[_0x7944('0x7')]['name']}})['then'](function(){_0x1540b5();})['catch'](function(_0x294c30){_0x1540b5(_0x294c30);});}}});};