Built motion from commit (unavailable).|2.4.18
[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 _0xaa32=['closedAt','format','lodash','util','../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./smsInteraction.attributes','define','sms_interactions','changed','closed'];(function(_0x4ae02f,_0x3d0288){var _0x924d5d=function(_0x6f047e){while(--_0x6f047e){_0x4ae02f['push'](_0x4ae02f['shift']());}};_0x924d5d(++_0x3d0288);}(_0xaa32,0x12e));var _0x2aa3=function(_0x61fd3a,_0x15a094){_0x61fd3a=_0x61fd3a-0x0;var _0x546d6b=_0xaa32[_0x61fd3a];return _0x546d6b;};'use strict';var _=require(_0x2aa3('0x0'));var util=require(_0x2aa3('0x1'));var logger=require(_0x2aa3('0x2'))(_0x2aa3('0x3'));var moment=require(_0x2aa3('0x4'));var BPromise=require(_0x2aa3('0x5'));var rp=require(_0x2aa3('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x2aa3('0x7'));var attributes=require(_0x2aa3('0x8'));module['exports']=function(_0xc2d879,_0x4a3534){return _0xc2d879[_0x2aa3('0x9')]('SmsInteraction',attributes,{'tableName':_0x2aa3('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1d79b9,_0x2b1d33,_0x517109){if(_0x1d79b9[_0x2aa3('0xb')](_0x2aa3('0xc'))){_0x1d79b9[_0x2aa3('0xd')]=moment()[_0x2aa3('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x517109(null,_0x1d79b9);}}});};