Built motion from commit (unavailable).|2.5.11
[motion2.git] / server / api / chatInteraction / chatInteraction.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 _0xd1f7=['changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','define','chat_interactions'];(function(_0xd812c8,_0x2d76b2){var _0x303c48=function(_0x1d43a2){while(--_0x1d43a2){_0xd812c8['push'](_0xd812c8['shift']());}};_0x303c48(++_0x2d76b2);}(_0xd1f7,0x1ab));var _0x7d1f=function(_0x5f4f34,_0x45345b){_0x5f4f34=_0x5f4f34-0x0;var _0x30311b=_0xd1f7[_0x5f4f34];return _0x30311b;};'use strict';var _=require(_0x7d1f('0x0'));var util=require(_0x7d1f('0x1'));var logger=require(_0x7d1f('0x2'))('api');var moment=require(_0x7d1f('0x3'));var BPromise=require(_0x7d1f('0x4'));var rp=require(_0x7d1f('0x5'));var fs=require('fs');var path=require(_0x7d1f('0x6'));var rimraf=require(_0x7d1f('0x7'));var config=require(_0x7d1f('0x8'));var attributes=require(_0x7d1f('0x9'));module[_0x7d1f('0xa')]=function(_0x44fd33,_0x231407){return _0x44fd33[_0x7d1f('0xb')]('ChatInteraction',attributes,{'tableName':_0x7d1f('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x201b50,_0x5ed375,_0x15db5f){if(_0x201b50[_0x7d1f('0xd')](_0x7d1f('0xe'))){_0x201b50[_0x7d1f('0xf')]=moment()[_0x7d1f('0x10')](_0x7d1f('0x11'));}_0x15db5f(null,_0x201b50);}},'charset':_0x7d1f('0x12'),'collate':_0x7d1f('0x13')});};