Built motion from commit 5293bb2a.|2.6.30
[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 _0x5f23=['mailSubstatus','name','then','catch','./mailSubstatus.attributes','exports','define','mail_substatuses','Condition','update'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5f23,0x7c));var _0x35f2=function(_0x355da5,_0x210f7a){_0x355da5=_0x355da5-0x0;var _0x4cd60d=_0x5f23[_0x355da5];return _0x4cd60d;};'use strict';var attributes=require(_0x35f2('0x0'));module[_0x35f2('0x1')]=function(_0x2cd0f3){var _0xb8aaf=_0x2cd0f3['models'];return _0x2cd0f3[_0x35f2('0x2')]('MailSubstatus',attributes,{'tableName':_0x35f2('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x19e704,_0x404767,_0x2cc58a){return _0xb8aaf[_0x35f2('0x4')][_0x35f2('0x5')]({'value':_0x19e704['name']},{'where':{'field':_0x35f2('0x6'),'value':_0x19e704['_previousDataValues'][_0x35f2('0x7')]}})[_0x35f2('0x8')](function(){_0x2cc58a();})[_0x35f2('0x9')](function(_0xb2b4dc){_0x2cc58a(_0xb2b4dc);});}}});};