Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / smsInteraction / smsInteraction.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 _0x3bf8=['request-promise','rimraf','../../config/environment','./smsInteraction.attributes','exports','define','SmsInteraction','sms_interactions','changed','closed','closedAt','lodash','api','bluebird'];(function(_0x585133,_0x2412a1){var _0x18254a=function(_0x4c8aaf){while(--_0x4c8aaf){_0x585133['push'](_0x585133['shift']());}};_0x18254a(++_0x2412a1);}(_0x3bf8,0x89));var _0x83bf=function(_0x3ff555,_0x42feb6){_0x3ff555=_0x3ff555-0x0;var _0x20351d=_0x3bf8[_0x3ff555];return _0x20351d;};'use strict';var _=require(_0x83bf('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x83bf('0x1'));var moment=require('moment');var BPromise=require(_0x83bf('0x2'));var rp=require(_0x83bf('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x83bf('0x4'));var config=require(_0x83bf('0x5'));var attributes=require(_0x83bf('0x6'));module[_0x83bf('0x7')]=function(_0x5515a2,_0x536289){return _0x5515a2[_0x83bf('0x8')](_0x83bf('0x9'),attributes,{'tableName':_0x83bf('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4128ed,_0x368e2e,_0x4bb88a){if(_0x4128ed[_0x83bf('0xb')](_0x83bf('0xc'))){_0x4128ed[_0x83bf('0xd')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x4bb88a(null,_0x4128ed);}}});};