Built motion from commit (unavailable).|2.5.30
[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 _0xa380=['exports','define','chat_interactions','closed','format','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes'];(function(_0x2ae2ad,_0xac5b0c){var _0x26dbd7=function(_0x5e685b){while(--_0x5e685b){_0x2ae2ad['push'](_0x2ae2ad['shift']());}};_0x26dbd7(++_0xac5b0c);}(_0xa380,0x1cc));var _0x0a38=function(_0x10d234,_0x2012ce){_0x10d234=_0x10d234-0x0;var _0x19f53b=_0xa380[_0x10d234];return _0x19f53b;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x0a38('0x0'))(_0x0a38('0x1'));var moment=require(_0x0a38('0x2'));var BPromise=require('bluebird');var rp=require(_0x0a38('0x3'));var fs=require('fs');var path=require(_0x0a38('0x4'));var rimraf=require(_0x0a38('0x5'));var config=require(_0x0a38('0x6'));var attributes=require(_0x0a38('0x7'));module[_0x0a38('0x8')]=function(_0x146f74,_0x18d3ea){return _0x146f74[_0x0a38('0x9')]('ChatInteraction',attributes,{'tableName':_0x0a38('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1051e6,_0x251d98,_0x92bf3){if(_0x1051e6['changed'](_0x0a38('0xb'))){_0x1051e6['closedAt']=moment()[_0x0a38('0xc')]('YYYY-MM-DD\x20HH:mm:ss');}_0x92bf3(null,_0x1051e6);}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};