ba45497e065edce3e22b39236fc0908fc5e4a8c4
[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 _0x88ec=['./smsInteraction.attributes','exports','define','sms_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','request-promise','path','../../config/environment'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x88ec,0x16e));var _0xc88e=function(_0x2ab967,_0x3d5a27){_0x2ab967=_0x2ab967-0x0;var _0x1a0198=_0x88ec[_0x2ab967];return _0x1a0198;};'use strict';var _=require(_0xc88e('0x0'));var util=require(_0xc88e('0x1'));var logger=require(_0xc88e('0x2'))(_0xc88e('0x3'));var moment=require(_0xc88e('0x4'));var BPromise=require('bluebird');var rp=require(_0xc88e('0x5'));var fs=require('fs');var path=require(_0xc88e('0x6'));var rimraf=require('rimraf');var config=require(_0xc88e('0x7'));var attributes=require(_0xc88e('0x8'));module[_0xc88e('0x9')]=function(_0x1d115e,_0x95d34b){return _0x1d115e[_0xc88e('0xa')]('SmsInteraction',attributes,{'tableName':_0xc88e('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x322a31,_0x1b5b5e,_0xd831be){if(_0x322a31[_0xc88e('0xc')](_0xc88e('0xd'))){_0x322a31[_0xc88e('0xe')]=moment()[_0xc88e('0xf')](_0xc88e('0x10'));}_0xd831be(null,_0x322a31);}}});};