Built motion from commit 5ae82ce5.|2.6.7
[motion2.git] / server / api / squareProject / squareProject.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 _0x6003=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./squareProject.attributes','define','SquareProject','square_projects','changed','preproduction','savedAt','format','YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','lodash','util'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x6003,0xd0));var _0x3600=function(_0x59d339,_0x10fb52){_0x59d339=_0x59d339-0x0;var _0x1923cf=_0x6003[_0x59d339];return _0x1923cf;};'use strict';var _=require(_0x3600('0x0'));var util=require(_0x3600('0x1'));var logger=require(_0x3600('0x2'))(_0x3600('0x3'));var moment=require(_0x3600('0x4'));var BPromise=require(_0x3600('0x5'));var rp=require(_0x3600('0x6'));var fs=require('fs');var path=require(_0x3600('0x7'));var rimraf=require(_0x3600('0x8'));var config=require(_0x3600('0x9'));var attributes=require(_0x3600('0xa'));module['exports']=function(_0x32ea9e,_0x3409b5){return _0x32ea9e[_0x3600('0xb')](_0x3600('0xc'),attributes,{'tableName':_0x3600('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1341f1,_0x14f0fa,_0x4a3adc){if(_0x1341f1[_0x3600('0xe')](_0x3600('0xf'))){_0x1341f1[_0x3600('0x10')]=moment()[_0x3600('0x11')](_0x3600('0x12'));}if(_0x1341f1[_0x3600('0xe')](_0x3600('0x13'))){_0x1341f1[_0x3600('0x14')]=moment()['format'](_0x3600('0x12'));}_0x4a3adc(null,_0x1341f1);}}});};