Built motion from commit (unavailable).|2.5.17
[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 _0xe57f=['./smsInteraction.attributes','exports','SmsInteraction','sms_interactions','changed','closed','closedAt','format','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x1741ba,_0x33116f){var _0x2a3110=function(_0xb5278c){while(--_0xb5278c){_0x1741ba['push'](_0x1741ba['shift']());}};_0x2a3110(++_0x33116f);}(_0xe57f,0x1c8));var _0xfe57=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0xe57f[_0x17d9e3];return _0x14192d;};'use strict';var _=require('lodash');var util=require(_0xfe57('0x0'));var logger=require(_0xfe57('0x1'))(_0xfe57('0x2'));var moment=require(_0xfe57('0x3'));var BPromise=require(_0xfe57('0x4'));var rp=require(_0xfe57('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xfe57('0x6'));var config=require(_0xfe57('0x7'));var attributes=require(_0xfe57('0x8'));module[_0xfe57('0x9')]=function(_0xe6f5d1,_0x4df80b){return _0xe6f5d1['define'](_0xfe57('0xa'),attributes,{'tableName':_0xfe57('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1a7c13,_0x42cd9a,_0x2f7954){if(_0x1a7c13[_0xfe57('0xc')](_0xfe57('0xd'))){_0x1a7c13[_0xfe57('0xe')]=moment()[_0xfe57('0xf')]('YYYY-MM-DD\x20HH:mm:ss');}_0x2f7954(null,_0x1a7c13);}}});};