Built motion from commit e02f907f.|2.6.14
[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 _0x44ee=['sms_interactions','closed','closedAt','format','lodash','util','api','moment','bluebird','../../config/environment','./smsInteraction.attributes','SmsInteraction'];(function(_0x29dc8a,_0x784548){var _0x3512f1=function(_0x32191e){while(--_0x32191e){_0x29dc8a['push'](_0x29dc8a['shift']());}};_0x3512f1(++_0x784548);}(_0x44ee,0x1e4));var _0xe44e=function(_0x27472e,_0x7cee2f){_0x27472e=_0x27472e-0x0;var _0x3338fe=_0x44ee[_0x27472e];return _0x3338fe;};'use strict';var _=require(_0xe44e('0x0'));var util=require(_0xe44e('0x1'));var logger=require('../../config/logger')(_0xe44e('0x2'));var moment=require(_0xe44e('0x3'));var BPromise=require(_0xe44e('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xe44e('0x5'));var attributes=require(_0xe44e('0x6'));module['exports']=function(_0x255d1b,_0xa13921){return _0x255d1b['define'](_0xe44e('0x7'),attributes,{'tableName':_0xe44e('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x5d6d45,_0x516401,_0x7391ab){if(_0x5d6d45['changed'](_0xe44e('0x9'))){_0x5d6d45[_0xe44e('0xa')]=moment()[_0xe44e('0xb')]('YYYY-MM-DD\x20HH:mm:ss');}_0x7391ab(null,_0x5d6d45);}}});};