Built motion from commit (unavailable).|2.5.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 _0x9a5a=['./smsInteraction.attributes','define','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x31dde9,_0x12e816){var _0x1fbf2d=function(_0x1d1bf6){while(--_0x1d1bf6){_0x31dde9['push'](_0x31dde9['shift']());}};_0x1fbf2d(++_0x12e816);}(_0x9a5a,0x1d2));var _0xa9a5=function(_0x5471c6,_0x2aa365){_0x5471c6=_0x5471c6-0x0;var _0x170ac2=_0x9a5a[_0x5471c6];return _0x170ac2;};'use strict';var _=require(_0xa9a5('0x0'));var util=require(_0xa9a5('0x1'));var logger=require(_0xa9a5('0x2'))(_0xa9a5('0x3'));var moment=require(_0xa9a5('0x4'));var BPromise=require(_0xa9a5('0x5'));var rp=require(_0xa9a5('0x6'));var fs=require('fs');var path=require(_0xa9a5('0x7'));var rimraf=require(_0xa9a5('0x8'));var config=require(_0xa9a5('0x9'));var attributes=require(_0xa9a5('0xa'));module['exports']=function(_0x54e642,_0x31d10a){return _0x54e642[_0xa9a5('0xb')]('SmsInteraction',attributes,{'tableName':'sms_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x5104b6,_0x423074,_0x1b1e7a){if(_0x5104b6['changed']('closed')){_0x5104b6['closedAt']=moment()[_0xa9a5('0xc')](_0xa9a5('0xd'));}_0x1b1e7a(null,_0x5104b6);}}});};