Built motion from commit 87cd5f02.|2.5.48
[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 _0x61ac=['exports','define','MailSubstatus','name','catch','./mailSubstatus.attributes'];(function(_0x160c73,_0x2ee678){var _0xd9302=function(_0x169454){while(--_0x169454){_0x160c73['push'](_0x160c73['shift']());}};_0xd9302(++_0x2ee678);}(_0x61ac,0x155));var _0xc61a=function(_0x26a906,_0x3d135c){_0x26a906=_0x26a906-0x0;var _0x495575=_0x61ac[_0x26a906];return _0x495575;};'use strict';var attributes=require(_0xc61a('0x0'));module[_0xc61a('0x1')]=function(_0x22964e){var _0x30be5a=_0x22964e['models'];return _0x22964e[_0xc61a('0x2')](_0xc61a('0x3'),attributes,{'tableName':'mail_substatuses','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x44d35d,_0x235205,_0x1d93b9){return _0x30be5a['Condition']['update']({'value':_0x44d35d[_0xc61a('0x4')]},{'where':{'field':'mailSubstatus','value':_0x44d35d['_previousDataValues'][_0xc61a('0x4')]}})['then'](function(){_0x1d93b9();})[_0xc61a('0x5')](function(_0x232e1d){_0x1d93b9(_0x232e1d);});}}});};