Built motion from commit (unavailable).|2.4.18
[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 _0x6ea9=['format','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','define','ChatInteraction','chat_interactions','closed','closedAt'];(function(_0x4ae6ef,_0xc2af80){var _0x3cbb4e=function(_0x569ad5){while(--_0x569ad5){_0x4ae6ef['push'](_0x4ae6ef['shift']());}};_0x3cbb4e(++_0xc2af80);}(_0x6ea9,0xab));var _0x96ea=function(_0x5ed6ae,_0x172715){_0x5ed6ae=_0x5ed6ae-0x0;var _0x43fd55=_0x6ea9[_0x5ed6ae];return _0x43fd55;};'use strict';var _=require(_0x96ea('0x0'));var util=require(_0x96ea('0x1'));var logger=require(_0x96ea('0x2'))(_0x96ea('0x3'));var moment=require('moment');var BPromise=require(_0x96ea('0x4'));var rp=require(_0x96ea('0x5'));var fs=require('fs');var path=require(_0x96ea('0x6'));var rimraf=require(_0x96ea('0x7'));var config=require(_0x96ea('0x8'));var attributes=require(_0x96ea('0x9'));module[_0x96ea('0xa')]=function(_0x3c4b0c,_0xb0338e){return _0x3c4b0c[_0x96ea('0xb')](_0x96ea('0xc'),attributes,{'tableName':_0x96ea('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x52ed1c,_0x5a557b,_0x52f951){if(_0x52ed1c['changed'](_0x96ea('0xe'))){_0x52ed1c[_0x96ea('0xf')]=moment()[_0x96ea('0x10')]('YYYY-MM-DD\x20HH:mm:ss');}_0x52f951(null,_0x52ed1c);}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};