Built motion from commit 753c950e.|2.5.42
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.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 _0x38d5=['rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','changed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x3a86b4,_0x8874ba){var _0x5ae7df=function(_0x10e3e5){while(--_0x10e3e5){_0x3a86b4['push'](_0x3a86b4['shift']());}};_0x5ae7df(++_0x8874ba);}(_0x38d5,0x66));var _0x538d=function(_0x533971,_0x3e91e6){_0x533971=_0x533971-0x0;var _0x184ae7=_0x38d5[_0x533971];return _0x184ae7;};'use strict';var _=require(_0x538d('0x0'));var util=require('util');var logger=require(_0x538d('0x1'))(_0x538d('0x2'));var moment=require(_0x538d('0x3'));var BPromise=require(_0x538d('0x4'));var rp=require(_0x538d('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x538d('0x6'));var config=require(_0x538d('0x7'));var attributes=require(_0x538d('0x8'));module[_0x538d('0x9')]=function(_0x5bcdcf,_0x421271){return _0x5bcdcf[_0x538d('0xa')]('OpenchannelInteraction',attributes,{'tableName':_0x538d('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x538d('0xc'),'collate':_0x538d('0xd'),'hooks':{'beforeUpdate':function(_0x3fcc04,_0x4ef308,_0x36ca23){if(_0x3fcc04[_0x538d('0xe')]('closed')){_0x3fcc04[_0x538d('0xf')]=moment()[_0x538d('0x10')](_0x538d('0x11'));}_0x36ca23(null,_0x3fcc04);}}});};