ae5b43e8727dd3dfb015c482d555eee9e5594c7f
[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 _0x6a63=['MailSubstatus','mail_substatuses','update','mailSubstatus','_previousDataValues','then','./mailSubstatus.attributes','exports','define'];(function(_0x3fc9f1,_0x39e46f){var _0x5b7c86=function(_0x4cbaa9){while(--_0x4cbaa9){_0x3fc9f1['push'](_0x3fc9f1['shift']());}};_0x5b7c86(++_0x39e46f);}(_0x6a63,0x141));var _0x36a6=function(_0x40ac5e,_0x2de228){_0x40ac5e=_0x40ac5e-0x0;var _0x2839d6=_0x6a63[_0x40ac5e];return _0x2839d6;};'use strict';var attributes=require(_0x36a6('0x0'));module[_0x36a6('0x1')]=function(_0x178e75){var _0x3dd4d8=_0x178e75['models'];return _0x178e75[_0x36a6('0x2')](_0x36a6('0x3'),attributes,{'tableName':_0x36a6('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x30bc40,_0x2328bb,_0x342567){return _0x3dd4d8['Condition'][_0x36a6('0x5')]({'value':_0x30bc40['name']},{'where':{'field':_0x36a6('0x6'),'value':_0x30bc40[_0x36a6('0x7')]['name']}})[_0x36a6('0x8')](function(){_0x342567();})['catch'](function(_0x2ba94f){_0x342567(_0x2ba94f);});}}});};