Built motion from commit ddca4d0d.|2.5.47
[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 _0xd21b=['MailSubstatus','Condition','update','mailSubstatus','_previousDataValues','then','catch','models'];(function(_0x137d2f,_0x3b714c){var _0x21664a=function(_0x2d9f76){while(--_0x2d9f76){_0x137d2f['push'](_0x137d2f['shift']());}};_0x21664a(++_0x3b714c);}(_0xd21b,0xcf));var _0xbd21=function(_0x6a7421,_0x20b4f5){_0x6a7421=_0x6a7421-0x0;var _0x33f5d1=_0xd21b[_0x6a7421];return _0x33f5d1;};'use strict';var attributes=require('./mailSubstatus.attributes');module['exports']=function(_0x2c7f45){var _0x3afb0f=_0x2c7f45[_0xbd21('0x0')];return _0x2c7f45['define'](_0xbd21('0x1'),attributes,{'tableName':'mail_substatuses','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x549c37,_0x3bc0a0,_0x4ada96){return _0x3afb0f[_0xbd21('0x2')][_0xbd21('0x3')]({'value':_0x549c37['name']},{'where':{'field':_0xbd21('0x4'),'value':_0x549c37[_0xbd21('0x5')]['name']}})[_0xbd21('0x6')](function(){_0x4ada96();})[_0xbd21('0x7')](function(_0x4ddf6c){_0x4ada96(_0x4ddf6c);});}}});};