Built motion from commit c738b9ac.|2.6.25
[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 _0x2c6d=['utf8mb4_unicode_ci','changed','closed','closedAt','format','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions'];(function(_0xf91841,_0x182ae3){var _0x4b9c44=function(_0x2e216e){while(--_0x2e216e){_0xf91841['push'](_0xf91841['shift']());}};_0x4b9c44(++_0x182ae3);}(_0x2c6d,0x64));var _0xd2c6=function(_0x39f6f3,_0x459cbc){_0x39f6f3=_0x39f6f3-0x0;var _0x161061=_0x2c6d[_0x39f6f3];return _0x161061;};'use strict';var _=require(_0xd2c6('0x0'));var util=require(_0xd2c6('0x1'));var logger=require(_0xd2c6('0x2'))(_0xd2c6('0x3'));var moment=require(_0xd2c6('0x4'));var BPromise=require(_0xd2c6('0x5'));var rp=require(_0xd2c6('0x6'));var fs=require('fs');var path=require(_0xd2c6('0x7'));var rimraf=require(_0xd2c6('0x8'));var config=require('../../config/environment');var attributes=require(_0xd2c6('0x9'));module[_0xd2c6('0xa')]=function(_0x5eea87,_0x356557){return _0x5eea87[_0xd2c6('0xb')](_0xd2c6('0xc'),attributes,{'tableName':_0xd2c6('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xd2c6('0xe'),'hooks':{'beforeUpdate':function(_0x5d0c29,_0x15e153,_0x1057f5){if(_0x5d0c29[_0xd2c6('0xf')](_0xd2c6('0x10'))){_0x5d0c29[_0xd2c6('0x11')]=moment()[_0xd2c6('0x12')]('YYYY-MM-DD\x20HH:mm:ss');}_0x1057f5(null,_0x5d0c29);}}});};