84c6be8cd4729642d628dea9bb4f987b5025ea28
[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 _0x967a=['name','then','catch','./mailSubstatus.attributes','exports','models','define','MailSubstatus','Condition','update'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x967a,0x139));var _0xa967=function(_0x45d309,_0x5a8fae){_0x45d309=_0x45d309-0x0;var _0x3e5f88=_0x967a[_0x45d309];return _0x3e5f88;};'use strict';var attributes=require(_0xa967('0x0'));module[_0xa967('0x1')]=function(_0x2d2a57){var _0x2fd35f=_0x2d2a57[_0xa967('0x2')];return _0x2d2a57[_0xa967('0x3')](_0xa967('0x4'),attributes,{'tableName':'mail_substatuses','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x117615,_0x41164f,_0xaf894c){return _0x2fd35f[_0xa967('0x5')][_0xa967('0x6')]({'value':_0x117615['name']},{'where':{'field':'mailSubstatus','value':_0x117615['_previousDataValues'][_0xa967('0x7')]}})[_0xa967('0x8')](function(){_0xaf894c();})[_0xa967('0x9')](function(_0x4cdba7){_0xaf894c(_0x4cdba7);});}}});};