Built motion from commit e0fa946e.|2.6.5
[motion2.git] / server / api / user-setting / user-setting.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 _0x34b7=['clientSideLoggingEnabledSince','define','UserSetting','user_settings','clientSideLoggingEnabled'];(function(_0x2c3c3f,_0x2436f8){var _0x1f5280=function(_0x4fd8fa){while(--_0x4fd8fa){_0x2c3c3f['push'](_0x2c3c3f['shift']());}};_0x1f5280(++_0x2436f8);}(_0x34b7,0x196));var _0x734b=function(_0x1afc73,_0x1e3ecb){_0x1afc73=_0x1afc73-0x0;var _0x23f0d2=_0x34b7[_0x1afc73];return _0x23f0d2;};'use strict';var attributes=require('./user-setting.attributes');module['exports']=function(_0x43a5f1){return _0x43a5f1[_0x734b('0x0')](_0x734b('0x1'),attributes,{'tableName':_0x734b('0x2'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xa2ff85){if(!_0xa2ff85[_0x734b('0x3')])_0xa2ff85['clientSideLoggingEnabledSince']=null;else if(_0xa2ff85['clientSideLoggingEnabledSince']===null)_0xa2ff85[_0x734b('0x4')]=new Date();}}});};