Built motion from commit e6806ed6.|2.6.0
[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 _0x40e0=['YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./smsInteraction.attributes','exports','define','SmsInteraction','closed','closedAt','format'];(function(_0x5b6480,_0x34543f){var _0x1382bb=function(_0x4ae5d4){while(--_0x4ae5d4){_0x5b6480['push'](_0x5b6480['shift']());}};_0x1382bb(++_0x34543f);}(_0x40e0,0x1f0));var _0x040e=function(_0xe736bf,_0xb5fdf3){_0xe736bf=_0xe736bf-0x0;var _0x2322e2=_0x40e0[_0xe736bf];return _0x2322e2;};'use strict';var _=require(_0x040e('0x0'));var util=require('util');var logger=require(_0x040e('0x1'))(_0x040e('0x2'));var moment=require(_0x040e('0x3'));var BPromise=require(_0x040e('0x4'));var rp=require(_0x040e('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x040e('0x6'));var attributes=require(_0x040e('0x7'));module[_0x040e('0x8')]=function(_0x3fe231,_0x1f192b){return _0x3fe231[_0x040e('0x9')](_0x040e('0xa'),attributes,{'tableName':'sms_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x396b22,_0x416756,_0x28823e){if(_0x396b22['changed'](_0x040e('0xb'))){_0x396b22[_0x040e('0xc')]=moment()[_0x040e('0xd')](_0x040e('0xe'));}_0x28823e(null,_0x396b22);}}});};