Built motion from commit 9d0783e6.|2.6.13
[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 _0x8ed9=['sms_interactions','closed','closedAt','format','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports'];(function(_0x5699a0,_0x26289e){var _0x14eff2=function(_0x473f75){while(--_0x473f75){_0x5699a0['push'](_0x5699a0['shift']());}};_0x14eff2(++_0x26289e);}(_0x8ed9,0xc7));var _0x98ed=function(_0x4e76da,_0x291b71){_0x4e76da=_0x4e76da-0x0;var _0x5f14e8=_0x8ed9[_0x4e76da];return _0x5f14e8;};'use strict';var _=require('lodash');var util=require(_0x98ed('0x0'));var logger=require('../../config/logger')(_0x98ed('0x1'));var moment=require(_0x98ed('0x2'));var BPromise=require(_0x98ed('0x3'));var rp=require(_0x98ed('0x4'));var fs=require('fs');var path=require(_0x98ed('0x5'));var rimraf=require(_0x98ed('0x6'));var config=require(_0x98ed('0x7'));var attributes=require('./smsInteraction.attributes');module[_0x98ed('0x8')]=function(_0x2bd6eb,_0x2cc532){return _0x2bd6eb['define']('SmsInteraction',attributes,{'tableName':_0x98ed('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x37bc60,_0x417408,_0x2941ca){if(_0x37bc60['changed'](_0x98ed('0xa'))){_0x37bc60[_0x98ed('0xb')]=moment()[_0x98ed('0xc')]('YYYY-MM-DD\x20HH:mm:ss');}_0x2941ca(null,_0x37bc60);}}});};