Built motion from commit (unavailable).|2.5.30
[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 _0x96f5=['request-promise','path','../../config/environment','exports','sms_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','bluebird'];(function(_0x2341bc,_0x33729a){var _0x2715f7=function(_0x1e001b){while(--_0x1e001b){_0x2341bc['push'](_0x2341bc['shift']());}};_0x2715f7(++_0x33729a);}(_0x96f5,0xdc));var _0x596f=function(_0x56db2c,_0x156f7d){_0x56db2c=_0x56db2c-0x0;var _0x1a9bf1=_0x96f5[_0x56db2c];return _0x1a9bf1;};'use strict';var _=require(_0x596f('0x0'));var util=require('util');var logger=require(_0x596f('0x1'))(_0x596f('0x2'));var moment=require(_0x596f('0x3'));var BPromise=require(_0x596f('0x4'));var rp=require(_0x596f('0x5'));var fs=require('fs');var path=require(_0x596f('0x6'));var rimraf=require('rimraf');var config=require(_0x596f('0x7'));var attributes=require('./smsInteraction.attributes');module[_0x596f('0x8')]=function(_0xd13470,_0x8c3653){return _0xd13470['define']('SmsInteraction',attributes,{'tableName':_0x596f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2b00b1,_0x510666,_0x3b3a74){if(_0x2b00b1[_0x596f('0xa')](_0x596f('0xb'))){_0x2b00b1[_0x596f('0xc')]=moment()[_0x596f('0xd')](_0x596f('0xe'));}_0x3b3a74(null,_0x2b00b1);}}});};