f4fff8d95162b0851a3e63189cbfce8b39e1af7d
[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 _0x1c03=['../../config/environment','./squareProject.attributes','exports','define','SquareProject','changed','preproduction','savedAt','format','YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf'];(function(_0xe2bb9e,_0x2629a9){var _0x43ba10=function(_0x21a370){while(--_0x21a370){_0xe2bb9e['push'](_0xe2bb9e['shift']());}};_0x43ba10(++_0x2629a9);}(_0x1c03,0xca));var _0x31c0=function(_0x367336,_0x18c229){_0x367336=_0x367336-0x0;var _0x3423a7=_0x1c03[_0x367336];return _0x3423a7;};'use strict';var _=require(_0x31c0('0x0'));var util=require(_0x31c0('0x1'));var logger=require(_0x31c0('0x2'))('api');var moment=require(_0x31c0('0x3'));var BPromise=require(_0x31c0('0x4'));var rp=require(_0x31c0('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x31c0('0x6'));var config=require(_0x31c0('0x7'));var attributes=require(_0x31c0('0x8'));module[_0x31c0('0x9')]=function(_0x248932,_0x423fb1){return _0x248932[_0x31c0('0xa')](_0x31c0('0xb'),attributes,{'tableName':'square_projects','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1cd81c,_0x41fd87,_0x895a25){if(_0x1cd81c[_0x31c0('0xc')](_0x31c0('0xd'))){_0x1cd81c[_0x31c0('0xe')]=moment()[_0x31c0('0xf')](_0x31c0('0x10'));}if(_0x1cd81c[_0x31c0('0xc')](_0x31c0('0x11'))){_0x1cd81c[_0x31c0('0x12')]=moment()[_0x31c0('0xf')]('YYYY-MM-DD\x20HH:mm:ss');}_0x895a25(null,_0x1cd81c);}}});};