Built motion from commit d5e4af8c.|2.6.23
[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 _0x25e2=['../../config/environment','./squareProject.attributes','exports','preproduction','savedAt','changed','production','publishedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x1126f2,_0x2cb7c3){var _0x8a9650=function(_0x1e05e5){while(--_0x1e05e5){_0x1126f2['push'](_0x1126f2['shift']());}};_0x8a9650(++_0x2cb7c3);}(_0x25e2,0x88));var _0x225e=function(_0x25c196,_0x365afc){_0x25c196=_0x25c196-0x0;var _0x5ac8ea=_0x25e2[_0x25c196];return _0x5ac8ea;};'use strict';var _=require(_0x225e('0x0'));var util=require(_0x225e('0x1'));var logger=require(_0x225e('0x2'))(_0x225e('0x3'));var moment=require(_0x225e('0x4'));var BPromise=require(_0x225e('0x5'));var rp=require(_0x225e('0x6'));var fs=require('fs');var path=require(_0x225e('0x7'));var rimraf=require('rimraf');var config=require(_0x225e('0x8'));var attributes=require(_0x225e('0x9'));module[_0x225e('0xa')]=function(_0x131c2c,_0x376e92){return _0x131c2c['define']('SquareProject',attributes,{'tableName':'square_projects','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x118511,_0x10722d,_0x54b59f){if(_0x118511['changed'](_0x225e('0xb'))){_0x118511[_0x225e('0xc')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}if(_0x118511[_0x225e('0xd')](_0x225e('0xe'))){_0x118511[_0x225e('0xf')]=moment()[_0x225e('0x10')](_0x225e('0x11'));}_0x54b59f(null,_0x118511);}}});};