Built motion from commit (unavailable).|2.5.0
[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 _0xa75e=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','exports','define','SmsInteraction','sms_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x34ec72,_0x695f6c){var _0x285481=function(_0x35abcd){while(--_0x35abcd){_0x34ec72['push'](_0x34ec72['shift']());}};_0x285481(++_0x695f6c);}(_0xa75e,0x1c2));var _0xea75=function(_0x30a848,_0x408ca5){_0x30a848=_0x30a848-0x0;var _0x5d2369=_0xa75e[_0x30a848];return _0x5d2369;};'use strict';var _=require(_0xea75('0x0'));var util=require(_0xea75('0x1'));var logger=require(_0xea75('0x2'))(_0xea75('0x3'));var moment=require(_0xea75('0x4'));var BPromise=require(_0xea75('0x5'));var rp=require(_0xea75('0x6'));var fs=require('fs');var path=require(_0xea75('0x7'));var rimraf=require('rimraf');var config=require(_0xea75('0x8'));var attributes=require('./smsInteraction.attributes');module[_0xea75('0x9')]=function(_0x3711a6,_0x386095){return _0x3711a6[_0xea75('0xa')](_0xea75('0xb'),attributes,{'tableName':_0xea75('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3f15d4,_0x2dd828,_0x5e4ccd){if(_0x3f15d4[_0xea75('0xd')](_0xea75('0xe'))){_0x3f15d4[_0xea75('0xf')]=moment()[_0xea75('0x10')](_0xea75('0x11'));}_0x5e4ccd(null,_0x3f15d4);}}});};