Built motion from commit bab6f49e.|2.6.17
[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 _0x1d42=['closedAt','lodash','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','openchannel_interactions','changed','closed'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x1d42,0x88));var _0x21d4=function(_0x4fc8dd,_0x44239a){_0x4fc8dd=_0x4fc8dd-0x0;var _0xfa6052=_0x1d42[_0x4fc8dd];return _0xfa6052;};'use strict';var _=require(_0x21d4('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x21d4('0x1'));var moment=require(_0x21d4('0x2'));var BPromise=require(_0x21d4('0x3'));var rp=require(_0x21d4('0x4'));var fs=require('fs');var path=require(_0x21d4('0x5'));var rimraf=require(_0x21d4('0x6'));var config=require(_0x21d4('0x7'));var attributes=require(_0x21d4('0x8'));module[_0x21d4('0x9')]=function(_0x5cf1da,_0x3e52c5){return _0x5cf1da[_0x21d4('0xa')]('OpenchannelInteraction',attributes,{'tableName':_0x21d4('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci','hooks':{'beforeUpdate':function(_0x5ceb1d,_0x35af2f,_0x2e30e3){if(_0x5ceb1d[_0x21d4('0xc')](_0x21d4('0xd'))){_0x5ceb1d[_0x21d4('0xe')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x2e30e3(null,_0x5ceb1d);}}});};