Built motion from commit (unavailable).|2.5.1
[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 _0xd1ac=['YYYY-MM-DD\x20HH:mm:ss','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./smsInteraction.attributes','exports','SmsInteraction','sms_interactions','changed','closed','closedAt','format'];(function(_0x22fd6a,_0x50be64){var _0x31a7fe=function(_0x3dae06){while(--_0x3dae06){_0x22fd6a['push'](_0x22fd6a['shift']());}};_0x31a7fe(++_0x50be64);}(_0xd1ac,0x18d));var _0xcd1a=function(_0x2f8b3d,_0x408d44){_0x2f8b3d=_0x2f8b3d-0x0;var _0xfe9e29=_0xd1ac[_0x2f8b3d];return _0xfe9e29;};'use strict';var _=require(_0xcd1a('0x0'));var util=require(_0xcd1a('0x1'));var logger=require('../../config/logger')(_0xcd1a('0x2'));var moment=require(_0xcd1a('0x3'));var BPromise=require(_0xcd1a('0x4'));var rp=require(_0xcd1a('0x5'));var fs=require('fs');var path=require(_0xcd1a('0x6'));var rimraf=require(_0xcd1a('0x7'));var config=require(_0xcd1a('0x8'));var attributes=require(_0xcd1a('0x9'));module[_0xcd1a('0xa')]=function(_0x1a3d79,_0x1a0298){return _0x1a3d79['define'](_0xcd1a('0xb'),attributes,{'tableName':_0xcd1a('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x290cbb,_0x3e9c57,_0x2f4849){if(_0x290cbb[_0xcd1a('0xd')](_0xcd1a('0xe'))){_0x290cbb[_0xcd1a('0xf')]=moment()[_0xcd1a('0x10')](_0xcd1a('0x11'));}_0x2f4849(null,_0x290cbb);}}});};