UNPKG

@jfln/marvin-db

Version:

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

52 lines (41 loc) 937 B
import {Entity, Property, Enum} from '@mikro-orm/core' import {BaseEntity} from '../BaseEntity' export abstract class BasicEventEntity extends BaseEntity { @Property() messageId: string @Property() userId: string @Property() username: string @Property() eventId: string public setMessageId(messageId: string): this { this.messageId = messageId return this } public setUserId(userId: string): this { this.userId = userId return this } public setUsername(username: string): this { this.username = username return this } public setEventId(eventId: string): this { this.eventId = eventId return this } constructor( guildId: string, messageId: string, userId: string, username: string, eventId: string, ) { super(guildId) this.messageId = messageId this.userId = userId this.username = username this.eventId = eventId } }