Built motion from commit (unavailable).|2.5.21
[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 _0x8ff9=['bluebird','request-promise','path','rimraf','../../config/environment','./squareProject.attributes','define','SquareProject','changed','preproduction','savedAt','YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','lodash','util','../../config/logger','moment'];(function(_0x22bb7f,_0x348ea6){var _0x542b2a=function(_0x487cca){while(--_0x487cca){_0x22bb7f['push'](_0x22bb7f['shift']());}};_0x542b2a(++_0x348ea6);}(_0x8ff9,0x188));var _0x98ff=function(_0x286b58,_0x22dbd1){_0x286b58=_0x286b58-0x0;var _0x49c8cf=_0x8ff9[_0x286b58];return _0x49c8cf;};'use strict';var _=require(_0x98ff('0x0'));var util=require(_0x98ff('0x1'));var logger=require(_0x98ff('0x2'))('api');var moment=require(_0x98ff('0x3'));var BPromise=require(_0x98ff('0x4'));var rp=require(_0x98ff('0x5'));var fs=require('fs');var path=require(_0x98ff('0x6'));var rimraf=require(_0x98ff('0x7'));var config=require(_0x98ff('0x8'));var attributes=require(_0x98ff('0x9'));module['exports']=function(_0xe3db15,_0x4e61db){return _0xe3db15[_0x98ff('0xa')](_0x98ff('0xb'),attributes,{'tableName':'square_projects','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x421d77,_0x339612,_0x1632ce){if(_0x421d77[_0x98ff('0xc')](_0x98ff('0xd'))){_0x421d77[_0x98ff('0xe')]=moment()['format'](_0x98ff('0xf'));}if(_0x421d77[_0x98ff('0xc')](_0x98ff('0x10'))){_0x421d77[_0x98ff('0x11')]=moment()['format'](_0x98ff('0xf'));}_0x1632ce(null,_0x421d77);}}});};