6088602977fe4d69bc1f5e8bf832b721fc39d50c
[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 _0x7c58=['square_projects','changed','preproduction','savedAt','format','YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./squareProject.attributes','exports','define','SquareProject'];(function(_0x34b8cb,_0x5a8b2f){var _0x1dca7b=function(_0x1a2f92){while(--_0x1a2f92){_0x34b8cb['push'](_0x34b8cb['shift']());}};_0x1dca7b(++_0x5a8b2f);}(_0x7c58,0x119));var _0x87c5=function(_0x49b207,_0x408ade){_0x49b207=_0x49b207-0x0;var _0x2dc8fa=_0x7c58[_0x49b207];return _0x2dc8fa;};'use strict';var _=require(_0x87c5('0x0'));var util=require(_0x87c5('0x1'));var logger=require(_0x87c5('0x2'))(_0x87c5('0x3'));var moment=require(_0x87c5('0x4'));var BPromise=require(_0x87c5('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x87c5('0x6'));var rimraf=require(_0x87c5('0x7'));var config=require(_0x87c5('0x8'));var attributes=require(_0x87c5('0x9'));module[_0x87c5('0xa')]=function(_0x120bc4,_0x1fad7e){return _0x120bc4[_0x87c5('0xb')](_0x87c5('0xc'),attributes,{'tableName':_0x87c5('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x280747,_0x191154,_0x34db5b){if(_0x280747[_0x87c5('0xe')](_0x87c5('0xf'))){_0x280747[_0x87c5('0x10')]=moment()[_0x87c5('0x11')](_0x87c5('0x12'));}if(_0x280747[_0x87c5('0xe')](_0x87c5('0x13'))){_0x280747[_0x87c5('0x14')]=moment()[_0x87c5('0x11')](_0x87c5('0x12'));}_0x34db5b(null,_0x280747);}}});};