134225f1aa52d00c568236c4b30866b45aec3389
[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 _0xce33=['YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./smsInteraction.attributes','exports','define','SmsInteraction','sms_interactions','changed','closed','closedAt','format'];(function(_0x11e555,_0x51fb03){var _0x28144c=function(_0x2186bb){while(--_0x2186bb){_0x11e555['push'](_0x11e555['shift']());}};_0x28144c(++_0x51fb03);}(_0xce33,0x1c3));var _0x3ce3=function(_0x56e969,_0x2ed835){_0x56e969=_0x56e969-0x0;var _0x6577af=_0xce33[_0x56e969];return _0x6577af;};'use strict';var _=require(_0x3ce3('0x0'));var util=require(_0x3ce3('0x1'));var logger=require(_0x3ce3('0x2'))(_0x3ce3('0x3'));var moment=require(_0x3ce3('0x4'));var BPromise=require(_0x3ce3('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x3ce3('0x6'));var config=require(_0x3ce3('0x7'));var attributes=require(_0x3ce3('0x8'));module[_0x3ce3('0x9')]=function(_0xf01c6f,_0x551193){return _0xf01c6f[_0x3ce3('0xa')](_0x3ce3('0xb'),attributes,{'tableName':_0x3ce3('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2585e5,_0x15ae41,_0x5a816b){if(_0x2585e5[_0x3ce3('0xd')](_0x3ce3('0xe'))){_0x2585e5[_0x3ce3('0xf')]=moment()[_0x3ce3('0x10')](_0x3ce3('0x11'));}_0x5a816b(null,_0x2585e5);}}});};