Built motion from commit (unavailable).|2.5.19
[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 _0x2029=['./squareProject.attributes','exports','define','changed','savedAt','format','YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x6bd5bd,_0x1abd8e){var _0x50f87f=function(_0x149e46){while(--_0x149e46){_0x6bd5bd['push'](_0x6bd5bd['shift']());}};_0x50f87f(++_0x1abd8e);}(_0x2029,0x171));var _0x9202=function(_0x2cb3b4,_0x57e2b6){_0x2cb3b4=_0x2cb3b4-0x0;var _0xb16ef4=_0x2029[_0x2cb3b4];return _0xb16ef4;};'use strict';var _=require(_0x9202('0x0'));var util=require(_0x9202('0x1'));var logger=require('../../config/logger')(_0x9202('0x2'));var moment=require(_0x9202('0x3'));var BPromise=require(_0x9202('0x4'));var rp=require(_0x9202('0x5'));var fs=require('fs');var path=require(_0x9202('0x6'));var rimraf=require(_0x9202('0x7'));var config=require(_0x9202('0x8'));var attributes=require(_0x9202('0x9'));module[_0x9202('0xa')]=function(_0x299c13,_0x2f33bb){return _0x299c13[_0x9202('0xb')]('SquareProject',attributes,{'tableName':'square_projects','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4003ae,_0x5eba55,_0xd18653){if(_0x4003ae[_0x9202('0xc')]('preproduction')){_0x4003ae[_0x9202('0xd')]=moment()[_0x9202('0xe')](_0x9202('0xf'));}if(_0x4003ae[_0x9202('0xc')](_0x9202('0x10'))){_0x4003ae[_0x9202('0x11')]=moment()[_0x9202('0xe')](_0x9202('0xf'));}_0xd18653(null,_0x4003ae);}}});};