aea976f237884e8e4e75ad47878229e94bc3e075
[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 _0x0d4e=['production','publishedAt','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./squareProject.attributes','exports','square_projects','changed','preproduction','savedAt','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x5e370c,_0x5e0532){var _0x69c1b3=function(_0xb7084e){while(--_0xb7084e){_0x5e370c['push'](_0x5e370c['shift']());}};_0x69c1b3(++_0x5e0532);}(_0x0d4e,0x1ca));var _0xe0d4=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x0d4e[_0x4a9fb1];return _0x348672;};'use strict';var _=require(_0xe0d4('0x0'));var util=require(_0xe0d4('0x1'));var logger=require(_0xe0d4('0x2'))(_0xe0d4('0x3'));var moment=require(_0xe0d4('0x4'));var BPromise=require(_0xe0d4('0x5'));var rp=require(_0xe0d4('0x6'));var fs=require('fs');var path=require(_0xe0d4('0x7'));var rimraf=require(_0xe0d4('0x8'));var config=require('../../config/environment');var attributes=require(_0xe0d4('0x9'));module[_0xe0d4('0xa')]=function(_0x2cc782,_0x25bdbe){return _0x2cc782['define']('SquareProject',attributes,{'tableName':_0xe0d4('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1ba14d,_0x151e51,_0x439f1a){if(_0x1ba14d[_0xe0d4('0xc')](_0xe0d4('0xd'))){_0x1ba14d[_0xe0d4('0xe')]=moment()[_0xe0d4('0xf')](_0xe0d4('0x10'));}if(_0x1ba14d[_0xe0d4('0xc')](_0xe0d4('0x11'))){_0x1ba14d[_0xe0d4('0x12')]=moment()[_0xe0d4('0xf')]('YYYY-MM-DD\x20HH:mm:ss');}_0x439f1a(null,_0x1ba14d);}}});};