df1fa68f83b997e6b514f5b2d64c65863bc89d1f
[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 _0x3c57=['Condition','name','mailSubstatus','then','catch','./mailSubstatus.attributes','exports','models','define','MailSubstatus','mail_substatuses'];(function(_0x1834e0,_0x30ddba){var _0x52c0ee=function(_0x46a167){while(--_0x46a167){_0x1834e0['push'](_0x1834e0['shift']());}};_0x52c0ee(++_0x30ddba);}(_0x3c57,0x1c8));var _0x73c5=function(_0x260d60,_0x3a021e){_0x260d60=_0x260d60-0x0;var _0x4ea3ca=_0x3c57[_0x260d60];return _0x4ea3ca;};'use strict';var attributes=require(_0x73c5('0x0'));module[_0x73c5('0x1')]=function(_0x1e6436){var _0x1bfc91=_0x1e6436[_0x73c5('0x2')];return _0x1e6436[_0x73c5('0x3')](_0x73c5('0x4'),attributes,{'tableName':_0x73c5('0x5'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x50500c,_0x1095e5,_0x1757df){return _0x1bfc91[_0x73c5('0x6')]['update']({'value':_0x50500c[_0x73c5('0x7')]},{'where':{'field':_0x73c5('0x8'),'value':_0x50500c['_previousDataValues'][_0x73c5('0x7')]}})[_0x73c5('0x9')](function(){_0x1757df();})[_0x73c5('0xa')](function(_0x1edaf2){_0x1757df(_0x1edaf2);});}}});};