Built motion from commit 5b761a7b.|2.5.36
[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 _0x5100=['define','openchannel_interactions','changed','closedAt','format','lodash','util','api','bluebird','path','rimraf','./openchannelInteraction.attributes','exports'];(function(_0x142b46,_0x3ad7d5){var _0x6740bc=function(_0x417483){while(--_0x417483){_0x142b46['push'](_0x142b46['shift']());}};_0x6740bc(++_0x3ad7d5);}(_0x5100,0x1bf));var _0x0510=function(_0x2710c7,_0x1a5409){_0x2710c7=_0x2710c7-0x0;var _0xe16f3f=_0x5100[_0x2710c7];return _0xe16f3f;};'use strict';var _=require(_0x0510('0x0'));var util=require(_0x0510('0x1'));var logger=require('../../config/logger')(_0x0510('0x2'));var moment=require('moment');var BPromise=require(_0x0510('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0510('0x4'));var rimraf=require(_0x0510('0x5'));var config=require('../../config/environment');var attributes=require(_0x0510('0x6'));module[_0x0510('0x7')]=function(_0x421fb3,_0x1e604d){return _0x421fb3[_0x0510('0x8')]('OpenchannelInteraction',attributes,{'tableName':_0x0510('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci','hooks':{'beforeUpdate':function(_0x4ec412,_0x3dde52,_0x53b137){if(_0x4ec412[_0x0510('0xa')]('closed')){_0x4ec412[_0x0510('0xb')]=moment()[_0x0510('0xc')]('YYYY-MM-DD\x20HH:mm:ss');}_0x53b137(null,_0x4ec412);}}});};