Built motion from commit (unavailable).|2.5.16
[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 _0x2159=['./squareProject.attributes','exports','define','square_projects','changed','savedAt','format','YYYY-MM-DD\x20HH:mm:ss','publishedAt','lodash','util','../../config/logger','api','bluebird','path','rimraf','../../config/environment'];(function(_0x48eb1e,_0x30cb55){var _0x410494=function(_0x1cf500){while(--_0x1cf500){_0x48eb1e['push'](_0x48eb1e['shift']());}};_0x410494(++_0x30cb55);}(_0x2159,0x17f));var _0x9215=function(_0x115fcb,_0x2d6f74){_0x115fcb=_0x115fcb-0x0;var _0x227dc0=_0x2159[_0x115fcb];return _0x227dc0;};'use strict';var _=require(_0x9215('0x0'));var util=require(_0x9215('0x1'));var logger=require(_0x9215('0x2'))(_0x9215('0x3'));var moment=require('moment');var BPromise=require(_0x9215('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9215('0x5'));var rimraf=require(_0x9215('0x6'));var config=require(_0x9215('0x7'));var attributes=require(_0x9215('0x8'));module[_0x9215('0x9')]=function(_0x1fd854,_0x3be70d){return _0x1fd854[_0x9215('0xa')]('SquareProject',attributes,{'tableName':_0x9215('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x245ee1,_0xf3b4e1,_0x2db9ac){if(_0x245ee1[_0x9215('0xc')]('preproduction')){_0x245ee1[_0x9215('0xd')]=moment()[_0x9215('0xe')](_0x9215('0xf'));}if(_0x245ee1[_0x9215('0xc')]('production')){_0x245ee1[_0x9215('0x10')]=moment()[_0x9215('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x2db9ac(null,_0x245ee1);}}});};