860ab3baa9d8443ec1df188ea479290046c01d24
[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 _0x8b29=['clientSideLoggingEnabled','clientSideLoggingEnabledSince','./user-setting.attributes','define'];(function(_0x214d8e,_0x16a312){var _0x575266=function(_0x5480f9){while(--_0x5480f9){_0x214d8e['push'](_0x214d8e['shift']());}};_0x575266(++_0x16a312);}(_0x8b29,0xbe));var _0x98b2=function(_0x2b2597,_0x33a65c){_0x2b2597=_0x2b2597-0x0;var _0x406aa3=_0x8b29[_0x2b2597];return _0x406aa3;};'use strict';var attributes=require(_0x98b2('0x0'));module['exports']=function(_0xc35914){return _0xc35914[_0x98b2('0x1')]('UserSetting',attributes,{'tableName':'user_settings','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2363fe){if(!_0x2363fe[_0x98b2('0x2')])_0x2363fe['clientSideLoggingEnabledSince']=null;else if(_0x2363fe[_0x98b2('0x3')]===null)_0x2363fe['clientSideLoggingEnabledSince']=new Date();}}});};