1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x9613=['savedAt','format','YYYY-MM-DD\x20HH:mm:ss','production','lodash','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./squareProject.attributes','define','SquareProject','square_projects','preproduction'];(function(_0x278e3c,_0x1c9cfd){var _0x3e2d9b=function(_0x34d928){while(--_0x34d928){_0x278e3c['push'](_0x278e3c['shift']());}};_0x3e2d9b(++_0x1c9cfd);}(_0x9613,0x17a));var _0x3961=function(_0xea23f8,_0x2b76d2){_0xea23f8=_0xea23f8-0x0;var _0x437658=_0x9613[_0xea23f8];return _0x437658;};'use strict';var _=require(_0x3961('0x0'));var util=require('util');var logger=require(_0x3961('0x1'))('api');var moment=require(_0x3961('0x2'));var BPromise=require(_0x3961('0x3'));var rp=require(_0x3961('0x4'));var fs=require('fs');var path=require(_0x3961('0x5'));var rimraf=require(_0x3961('0x6'));var config=require(_0x3961('0x7'));var attributes=require(_0x3961('0x8'));module['exports']=function(_0x5c2cfd,_0x37313a){return _0x5c2cfd[_0x3961('0x9')](_0x3961('0xa'),attributes,{'tableName':_0x3961('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x16209e,_0x1e4001,_0x53e82b){if(_0x16209e['changed'](_0x3961('0xc'))){_0x16209e[_0x3961('0xd')]=moment()[_0x3961('0xe')](_0x3961('0xf'));}if(_0x16209e['changed'](_0x3961('0x10'))){_0x16209e['publishedAt']=moment()[_0x3961('0xe')](_0x3961('0xf'));}_0x53e82b(null,_0x16209e);}}});};