cb6856540c92c7b1bb2557e50e12d1d9c82f3950
[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 _0xc39c=['closedAt','format','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./smsInteraction.attributes','exports','define','SmsInteraction','sms_interactions','changed','closed'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc39c,0xd2));var _0xcc39=function(_0x2f37bf,_0x127efa){_0x2f37bf=_0x2f37bf-0x0;var _0x39b832=_0xc39c[_0x2f37bf];return _0x39b832;};'use strict';var _=require('lodash');var util=require(_0xcc39('0x0'));var logger=require(_0xcc39('0x1'))(_0xcc39('0x2'));var moment=require('moment');var BPromise=require(_0xcc39('0x3'));var rp=require(_0xcc39('0x4'));var fs=require('fs');var path=require(_0xcc39('0x5'));var rimraf=require('rimraf');var config=require(_0xcc39('0x6'));var attributes=require(_0xcc39('0x7'));module[_0xcc39('0x8')]=function(_0x3118f8,_0x592ad7){return _0x3118f8[_0xcc39('0x9')](_0xcc39('0xa'),attributes,{'tableName':_0xcc39('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x46bb71,_0x2f8544,_0x2664d4){if(_0x46bb71[_0xcc39('0xc')](_0xcc39('0xd'))){_0x46bb71[_0xcc39('0xe')]=moment()[_0xcc39('0xf')]('YYYY-MM-DD\x20HH:mm:ss');}_0x2664d4(null,_0x46bb71);}}});};