@jfln/marvin-db
Version:
biblioteca de objetos para normalizar o acesso a um banco mongo db
81 lines (63 loc) • 3.8 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DrawnEvent = void 0;
var _core = require("@mikro-orm/core");
var _BaseEntity = require("../BaseEntity");
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
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 DrawnEvent = (_dec = (0, _core.Entity)({
tableName: 'drawn-events'
}), _dec2 = Reflect.metadata("design:type", Function), _dec3 = Reflect.metadata("design:paramtypes", [String, Boolean, String, String, String]), _dec4 = (0, _core.Property)(), _dec5 = Reflect.metadata("design:type", Boolean), _dec6 = (0, _core.Property)(), _dec7 = Reflect.metadata("design:type", String), _dec8 = (0, _core.Property)(), _dec9 = Reflect.metadata("design:type", String), _dec10 = (0, _core.Property)(), _dec11 = Reflect.metadata("design:type", String), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class DrawnEvent extends _BaseEntity.BaseEntity {
setStatus(status) {
this.status = status;
return this;
}
setChannelId(channelId) {
this.channelId = channelId;
return this;
}
setResult(result) {
this.result = result;
return this;
}
setTitle(title) {
this.title = title;
return this;
}
constructor(guildId, status, channelId, result, title) {
super(guildId);
_initializerDefineProperty(this, "status", _descriptor, this);
_initializerDefineProperty(this, "channelId", _descriptor2, this);
_initializerDefineProperty(this, "result", _descriptor3, this);
_initializerDefineProperty(this, "title", _descriptor4, this);
this.status = status;
this.channelId = channelId;
this.result = result;
this.title = title;
}
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec4, _dec5], {
configurable: true,
enumerable: true,
writable: true,
initializer: null
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "channelId", [_dec6, _dec7], {
configurable: true,
enumerable: true,
writable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "result", [_dec8, _dec9], {
configurable: true,
enumerable: true,
writable: true,
initializer: null
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "title", [_dec10, _dec11], {
configurable: true,
enumerable: true,
writable: true,
initializer: null
})), _class2)) || _class) || _class) || _class);
exports.DrawnEvent = DrawnEvent;