1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x18b1=['hook','events','SquareProject','save','update','remove','emit'];(function(_0x3005d5,_0xf588c7){var _0x547c7e=function(_0x4514dc){while(--_0x4514dc){_0x3005d5['push'](_0x3005d5['shift']());}};_0x547c7e(++_0xf588c7);}(_0x18b1,0x143));var _0x118b=function(_0x2eb3db,_0x4a32c0){_0x2eb3db=_0x2eb3db-0x0;var _0x358f33=_0x18b1[_0x2eb3db];return _0x358f33;};'use strict';var EventEmitter=require(_0x118b('0x0'));var SquareProject=require('../../mysqldb')['db'][_0x118b('0x1')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x118b('0x2'),'afterUpdate':_0x118b('0x3'),'afterDestroy':_0x118b('0x4')};function emitEvent(_0x5c0de4){return function(_0x3c5c86,_0x2287cb,_0x52e81d){SquareProjectEvents[_0x118b('0x5')](_0x5c0de4+':'+_0x3c5c86['id'],_0x3c5c86);SquareProjectEvents[_0x118b('0x5')](_0x5c0de4,_0x3c5c86);_0x52e81d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject[_0x118b('0x6')](e,emitEvent(event));}}module['exports']=SquareProjectEvents;