Built motion from commit 85328c08.|2.5.50
[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 _0x5fd0=['request-promise','path','rimraf','../../config/environment','./smsInteraction.attributes','exports','define','SmsInteraction','sms_interactions','changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','lodash','util','api','moment','bluebird'];(function(_0x289576,_0x5ddc76){var _0x234ffc=function(_0x56d8b7){while(--_0x56d8b7){_0x289576['push'](_0x289576['shift']());}};_0x234ffc(++_0x5ddc76);}(_0x5fd0,0x67));var _0x05fd=function(_0xa62876,_0x2faa48){_0xa62876=_0xa62876-0x0;var _0x147953=_0x5fd0[_0xa62876];return _0x147953;};'use strict';var _=require(_0x05fd('0x0'));var util=require(_0x05fd('0x1'));var logger=require('../../config/logger')(_0x05fd('0x2'));var moment=require(_0x05fd('0x3'));var BPromise=require(_0x05fd('0x4'));var rp=require(_0x05fd('0x5'));var fs=require('fs');var path=require(_0x05fd('0x6'));var rimraf=require(_0x05fd('0x7'));var config=require(_0x05fd('0x8'));var attributes=require(_0x05fd('0x9'));module[_0x05fd('0xa')]=function(_0x4cde71,_0x333f9e){return _0x4cde71[_0x05fd('0xb')](_0x05fd('0xc'),attributes,{'tableName':_0x05fd('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x6eb2fb,_0x480598,_0x37bb76){if(_0x6eb2fb[_0x05fd('0xe')](_0x05fd('0xf'))){_0x6eb2fb[_0x05fd('0x10')]=moment()['format'](_0x05fd('0x11'));}_0x37bb76(null,_0x6eb2fb);}}});};