Built motion from commit (unavailable).|2.5.21
[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 _0x1822=['exports','define','changed','closed','closedAt','format','lodash','util','api','bluebird','request-promise','path','rimraf','../../config/environment','./smsInteraction.attributes'];(function(_0x11c573,_0x9e7c6e){var _0x6b72de=function(_0x2e8a61){while(--_0x2e8a61){_0x11c573['push'](_0x11c573['shift']());}};_0x6b72de(++_0x9e7c6e);}(_0x1822,0x1d7));var _0x2182=function(_0x1896f5,_0x38e4bf){_0x1896f5=_0x1896f5-0x0;var _0x13fa3e=_0x1822[_0x1896f5];return _0x13fa3e;};'use strict';var _=require(_0x2182('0x0'));var util=require(_0x2182('0x1'));var logger=require('../../config/logger')(_0x2182('0x2'));var moment=require('moment');var BPromise=require(_0x2182('0x3'));var rp=require(_0x2182('0x4'));var fs=require('fs');var path=require(_0x2182('0x5'));var rimraf=require(_0x2182('0x6'));var config=require(_0x2182('0x7'));var attributes=require(_0x2182('0x8'));module[_0x2182('0x9')]=function(_0x3b1f6a,_0xed4740){return _0x3b1f6a[_0x2182('0xa')]('SmsInteraction',attributes,{'tableName':'sms_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4ebbf0,_0x311703,_0x29e223){if(_0x4ebbf0[_0x2182('0xb')](_0x2182('0xc'))){_0x4ebbf0[_0x2182('0xd')]=moment()[_0x2182('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x29e223(null,_0x4ebbf0);}}});};