70e2bfbf846669fe03dd145149156c790c00b21a
[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 _0x4bde=['clientSideLoggingEnabledSince','./user-setting.attributes','exports','UserSetting','user_settings','clientSideLoggingEnabled'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x4bde,0x1b1));var _0xe4bd=function(_0x1b2130,_0x2046b4){_0x1b2130=_0x1b2130-0x0;var _0x586b3c=_0x4bde[_0x1b2130];return _0x586b3c;};'use strict';var attributes=require(_0xe4bd('0x0'));module[_0xe4bd('0x1')]=function(_0x611407){return _0x611407['define'](_0xe4bd('0x2'),attributes,{'tableName':_0xe4bd('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x416389){if(!_0x416389[_0xe4bd('0x4')])_0x416389['clientSideLoggingEnabledSince']=null;else if(_0x416389[_0xe4bd('0x5')]===null)_0x416389[_0xe4bd('0x5')]=new Date();}}});};