998d89b1f0f946a1bb89e0a012ac7fce3f443343
[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 _0x63b6=['square_projects','changed','preproduction','format','YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','lodash','util','../../config/logger','moment','request-promise','rimraf','../../config/environment','./squareProject.attributes','define'];(function(_0x1f8675,_0x272ee8){var _0x2d384e=function(_0x4d9185){while(--_0x4d9185){_0x1f8675['push'](_0x1f8675['shift']());}};_0x2d384e(++_0x272ee8);}(_0x63b6,0x127));var _0x663b=function(_0x31374c,_0x3ffe47){_0x31374c=_0x31374c-0x0;var _0x2156cc=_0x63b6[_0x31374c];return _0x2156cc;};'use strict';var _=require(_0x663b('0x0'));var util=require(_0x663b('0x1'));var logger=require(_0x663b('0x2'))('api');var moment=require(_0x663b('0x3'));var BPromise=require('bluebird');var rp=require(_0x663b('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x663b('0x5'));var config=require(_0x663b('0x6'));var attributes=require(_0x663b('0x7'));module['exports']=function(_0x4486b1,_0x57e43e){return _0x4486b1[_0x663b('0x8')]('SquareProject',attributes,{'tableName':_0x663b('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2976ff,_0xf8f3ff,_0x3ed933){if(_0x2976ff[_0x663b('0xa')](_0x663b('0xb'))){_0x2976ff['savedAt']=moment()[_0x663b('0xc')](_0x663b('0xd'));}if(_0x2976ff[_0x663b('0xa')](_0x663b('0xe'))){_0x2976ff[_0x663b('0xf')]=moment()[_0x663b('0xc')](_0x663b('0xd'));}_0x3ed933(null,_0x2976ff);}}});};