UNPKG

@jfln/marvin-db

Version:

biblioteca de objetos para normalizar o acesso a um banco mongo db

159 lines (129 loc) 7.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomEvent = void 0; var _core = require("@mikro-orm/core"); var _BaseEntity = require("../BaseEntity"); var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10; function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; } function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); } let CustomEvent = (_dec = (0, _core.Entity)({ tableName: 'custom-events' }), _dec2 = Reflect.metadata("design:type", Function), _dec3 = Reflect.metadata("design:paramtypes", [String, Boolean, Boolean, Boolean, Boolean, Boolean, String, String, String, String, Number]), _dec4 = (0, _core.Property)(), _dec5 = Reflect.metadata("design:type", Boolean), _dec6 = (0, _core.Property)(), _dec7 = Reflect.metadata("design:type", Boolean), _dec8 = (0, _core.Property)(), _dec9 = Reflect.metadata("design:type", Boolean), _dec10 = (0, _core.Property)(), _dec11 = Reflect.metadata("design:type", Boolean), _dec12 = (0, _core.Property)(), _dec13 = Reflect.metadata("design:type", Boolean), _dec14 = (0, _core.Property)(), _dec15 = Reflect.metadata("design:type", String), _dec16 = (0, _core.Property)(), _dec17 = Reflect.metadata("design:type", String), _dec18 = (0, _core.Property)(), _dec19 = Reflect.metadata("design:type", String), _dec20 = (0, _core.Property)(), _dec21 = Reflect.metadata("design:type", String), _dec22 = (0, _core.Property)(), _dec23 = Reflect.metadata("design:type", Number), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class CustomEvent extends _BaseEntity.BaseEntity { setAddReaction(addReaction) { this.addReaction = addReaction; return this; } setAutoDeleteMessage(autoDeleteMessage) { this.autoDeleteMessage = autoDeleteMessage; return this; } setOnlyText(onlyText) { this.onlyText = onlyText; return this; } setMultipleParticipation(multipleParticipation) { this.multipleParticipation = multipleParticipation; return this; } setStatus(status) { this.status = status; return this; } setChannelId(channelId) { this.channelId = channelId; return this; } setResult(result) { this.result = result; return this; } setTagParticipation(tagParticipation) { this.tagParticipation = tagParticipation; return this; } setTitle(title) { this.title = title; return this; } setTimeAutoDelete(timeAutoDelete) { this.timeAutoDelete = timeAutoDelete; return this; } constructor(guildId, addReaction, autoDeleteMessage, onlyText, multipleParticipation, status, channelId, result, tagParticipation, title, timeAutoDelete) { super(guildId); _initializerDefineProperty(this, "addReaction", _descriptor, this); _initializerDefineProperty(this, "autoDeleteMessage", _descriptor2, this); _initializerDefineProperty(this, "onlyText", _descriptor3, this); _initializerDefineProperty(this, "multipleParticipation", _descriptor4, this); _initializerDefineProperty(this, "status", _descriptor5, this); _initializerDefineProperty(this, "channelId", _descriptor6, this); _initializerDefineProperty(this, "result", _descriptor7, this); _initializerDefineProperty(this, "tagParticipation", _descriptor8, this); _initializerDefineProperty(this, "title", _descriptor9, this); _initializerDefineProperty(this, "timeAutoDelete", _descriptor10, this); this.addReaction = addReaction; this.autoDeleteMessage = autoDeleteMessage; this.onlyText = onlyText; this.multipleParticipation = multipleParticipation; this.status = status; this.channelId = channelId; this.result = result; this.tagParticipation = tagParticipation; this.title = title; this.timeAutoDelete = timeAutoDelete; } }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "addReaction", [_dec4, _dec5], { configurable: true, enumerable: true, writable: true, initializer: null }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "autoDeleteMessage", [_dec6, _dec7], { configurable: true, enumerable: true, writable: true, initializer: null }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "onlyText", [_dec8, _dec9], { configurable: true, enumerable: true, writable: true, initializer: null }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "multipleParticipation", [_dec10, _dec11], { configurable: true, enumerable: true, writable: true, initializer: null }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec12, _dec13], { configurable: true, enumerable: true, writable: true, initializer: null }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "channelId", [_dec14, _dec15], { configurable: true, enumerable: true, writable: true, initializer: null }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "result", [_dec16, _dec17], { configurable: true, enumerable: true, writable: true, initializer: null }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "tagParticipation", [_dec18, _dec19], { configurable: true, enumerable: true, writable: true, initializer: null }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "title", [_dec20, _dec21], { configurable: true, enumerable: true, writable: true, initializer: null }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "timeAutoDelete", [_dec22, _dec23], { configurable: true, enumerable: true, writable: true, initializer: null })), _class2)) || _class) || _class) || _class); exports.CustomEvent = CustomEvent;