Built motion from commit (unavailable).|2.5.26
[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 _0xfa2b=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./squareProject.attributes','exports','define','SquareProject','changed','preproduction','savedAt','format','YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','lodash','util'];(function(_0x4753c7,_0x5e0b51){var _0x445386=function(_0x156b28){while(--_0x156b28){_0x4753c7['push'](_0x4753c7['shift']());}};_0x445386(++_0x5e0b51);}(_0xfa2b,0x1b7));var _0xbfa2=function(_0x3b9d0a,_0x4d3eca){_0x3b9d0a=_0x3b9d0a-0x0;var _0x18de42=_0xfa2b[_0x3b9d0a];return _0x18de42;};'use strict';var _=require(_0xbfa2('0x0'));var util=require(_0xbfa2('0x1'));var logger=require(_0xbfa2('0x2'))(_0xbfa2('0x3'));var moment=require(_0xbfa2('0x4'));var BPromise=require(_0xbfa2('0x5'));var rp=require(_0xbfa2('0x6'));var fs=require('fs');var path=require(_0xbfa2('0x7'));var rimraf=require(_0xbfa2('0x8'));var config=require(_0xbfa2('0x9'));var attributes=require(_0xbfa2('0xa'));module[_0xbfa2('0xb')]=function(_0x12d71e,_0x237a99){return _0x12d71e[_0xbfa2('0xc')](_0xbfa2('0xd'),attributes,{'tableName':'square_projects','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x46a151,_0x4f17e6,_0x329e40){if(_0x46a151[_0xbfa2('0xe')](_0xbfa2('0xf'))){_0x46a151[_0xbfa2('0x10')]=moment()[_0xbfa2('0x11')](_0xbfa2('0x12'));}if(_0x46a151[_0xbfa2('0xe')](_0xbfa2('0x13'))){_0x46a151[_0xbfa2('0x14')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x329e40(null,_0x46a151);}}});};