Built motion from commit (unavailable).|2.5.11
[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 _0xa8eb=['YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','lodash','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','exports','SquareProject','square_projects','changed','preproduction','savedAt','format'];(function(_0x16c540,_0x315911){var _0x2cedfe=function(_0x28fd7c){while(--_0x28fd7c){_0x16c540['push'](_0x16c540['shift']());}};_0x2cedfe(++_0x315911);}(_0xa8eb,0x179));var _0xba8e=function(_0x5dde5b,_0x1c2e75){_0x5dde5b=_0x5dde5b-0x0;var _0x255434=_0xa8eb[_0x5dde5b];return _0x255434;};'use strict';var _=require(_0xba8e('0x0'));var util=require('util');var logger=require(_0xba8e('0x1'))('api');var moment=require(_0xba8e('0x2'));var BPromise=require(_0xba8e('0x3'));var rp=require(_0xba8e('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xba8e('0x5'));var config=require(_0xba8e('0x6'));var attributes=require('./squareProject.attributes');module[_0xba8e('0x7')]=function(_0x57e345,_0x14c3ac){return _0x57e345['define'](_0xba8e('0x8'),attributes,{'tableName':_0xba8e('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4b1bd6,_0x54a27a,_0x20e1f5){if(_0x4b1bd6[_0xba8e('0xa')](_0xba8e('0xb'))){_0x4b1bd6[_0xba8e('0xc')]=moment()[_0xba8e('0xd')](_0xba8e('0xe'));}if(_0x4b1bd6[_0xba8e('0xa')](_0xba8e('0xf'))){_0x4b1bd6[_0xba8e('0x10')]=moment()['format'](_0xba8e('0xe'));}_0x20e1f5(null,_0x4b1bd6);}}});};