Built motion from commit 7a4eb044.|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 _0x1a77=['closed','closedAt','lodash','api','bluebird','request-promise','path','rimraf','./openchannelInteraction.attributes','exports','define','openchannel_interactions','utf8mb4','changed'];(function(_0x9c2427,_0x17c865){var _0x51984f=function(_0x177af6){while(--_0x177af6){_0x9c2427['push'](_0x9c2427['shift']());}};_0x51984f(++_0x17c865);}(_0x1a77,0x1ec));var _0x71a7=function(_0x2e9995,_0x3f7476){_0x2e9995=_0x2e9995-0x0;var _0x6d5b14=_0x1a77[_0x2e9995];return _0x6d5b14;};'use strict';var _=require(_0x71a7('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x71a7('0x1'));var moment=require('moment');var BPromise=require(_0x71a7('0x2'));var rp=require(_0x71a7('0x3'));var fs=require('fs');var path=require(_0x71a7('0x4'));var rimraf=require(_0x71a7('0x5'));var config=require('../../config/environment');var attributes=require(_0x71a7('0x6'));module[_0x71a7('0x7')]=function(_0x25d7c7,_0x4c0a81){return _0x25d7c7[_0x71a7('0x8')]('OpenchannelInteraction',attributes,{'tableName':_0x71a7('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x71a7('0xa'),'collate':'utf8mb4_unicode_ci','hooks':{'beforeUpdate':function(_0x203e37,_0x3a812c,_0x990db2){if(_0x203e37[_0x71a7('0xb')](_0x71a7('0xc'))){_0x203e37[_0x71a7('0xd')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x990db2(null,_0x203e37);}}});};