Built motion from commit (unavailable).|2.5.22
[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 _0x49e1=['../../config/logger','api','moment','path','rimraf','./smsInteraction.attributes','define','SmsInteraction','sms_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util'];(function(_0x2a5b3b,_0x4ebe31){var _0xae665a=function(_0x59e86a){while(--_0x59e86a){_0x2a5b3b['push'](_0x2a5b3b['shift']());}};_0xae665a(++_0x4ebe31);}(_0x49e1,0x1be));var _0x149e=function(_0x44fdf9,_0x3f3e09){_0x44fdf9=_0x44fdf9-0x0;var _0x8e5072=_0x49e1[_0x44fdf9];return _0x8e5072;};'use strict';var _=require(_0x149e('0x0'));var util=require(_0x149e('0x1'));var logger=require(_0x149e('0x2'))(_0x149e('0x3'));var moment=require(_0x149e('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x149e('0x5'));var rimraf=require(_0x149e('0x6'));var config=require('../../config/environment');var attributes=require(_0x149e('0x7'));module['exports']=function(_0xda2d4b,_0x42f57b){return _0xda2d4b[_0x149e('0x8')](_0x149e('0x9'),attributes,{'tableName':_0x149e('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x596152,_0x264af7,_0x25c9fb){if(_0x596152[_0x149e('0xb')](_0x149e('0xc'))){_0x596152[_0x149e('0xd')]=moment()[_0x149e('0xe')](_0x149e('0xf'));}_0x25c9fb(null,_0x596152);}}});};