Built motion from commit (unavailable).|2.3.4
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.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 _0x9b8b=['openchannel_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','moment','bluebird','request-promise','./openchannelInteraction.attributes','OpenchannelInteraction'];(function(_0x4fbb37,_0x19a40e){var _0x4e6613=function(_0x3eef9c){while(--_0x3eef9c){_0x4fbb37['push'](_0x4fbb37['shift']());}};_0x4e6613(++_0x19a40e);}(_0x9b8b,0x76));var _0xb9b8=function(_0xbbd387,_0x68f6b4){_0xbbd387=_0xbbd387-0x0;var _0x150509=_0x9b8b[_0xbbd387];return _0x150509;};'use strict';var _=require(_0xb9b8('0x0'));var util=require(_0xb9b8('0x1'));var logger=require(_0xb9b8('0x2'))('api');var moment=require(_0xb9b8('0x3'));var BPromise=require(_0xb9b8('0x4'));var rp=require(_0xb9b8('0x5'));var attributes=require(_0xb9b8('0x6'));module['exports']=function(_0x554ec2,_0x1c6c8c){return _0x554ec2['define'](_0xb9b8('0x7'),attributes,{'tableName':_0xb9b8('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x51dba5,_0x52554a,_0x5bc805){if(_0x51dba5[_0xb9b8('0x9')](_0xb9b8('0xa'))){_0x51dba5[_0xb9b8('0xb')]=moment()[_0xb9b8('0xc')](_0xb9b8('0xd'));}_0x5bc805(null,_0x51dba5);}}});};