Built motion from commit b0a9a629.|2.6.33
[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 _0x355b=['SquareProject','preproduction','savedAt','format','YYYY-MM-DD\x20HH:mm:ss','changed','production','publishedAt','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./squareProject.attributes','exports','define'];(function(_0x49f8c2,_0x5166b7){var _0x3e63ec=function(_0x575c26){while(--_0x575c26){_0x49f8c2['push'](_0x49f8c2['shift']());}};_0x3e63ec(++_0x5166b7);}(_0x355b,0x170));var _0xb355=function(_0x59ceba,_0x1ad861){_0x59ceba=_0x59ceba-0x0;var _0x32f474=_0x355b[_0x59ceba];return _0x32f474;};'use strict';var _=require(_0xb355('0x0'));var util=require(_0xb355('0x1'));var logger=require(_0xb355('0x2'))(_0xb355('0x3'));var moment=require(_0xb355('0x4'));var BPromise=require('bluebird');var rp=require(_0xb355('0x5'));var fs=require('fs');var path=require(_0xb355('0x6'));var rimraf=require(_0xb355('0x7'));var config=require(_0xb355('0x8'));var attributes=require(_0xb355('0x9'));module[_0xb355('0xa')]=function(_0x5bbd26,_0x2af0aa){return _0x5bbd26[_0xb355('0xb')](_0xb355('0xc'),attributes,{'tableName':'square_projects','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2c342a,_0x608f2a,_0x24e069){if(_0x2c342a['changed'](_0xb355('0xd'))){_0x2c342a[_0xb355('0xe')]=moment()[_0xb355('0xf')](_0xb355('0x10'));}if(_0x2c342a[_0xb355('0x11')](_0xb355('0x12'))){_0x2c342a[_0xb355('0x13')]=moment()[_0xb355('0xf')](_0xb355('0x10'));}_0x24e069(null,_0x2c342a);}}});};