UNPKG

@jfln/marvin-db

Version:

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

35 lines (28 loc) 700 B
import {Entity, Property, Enum} from '@mikro-orm/core' import {BasicEventEntity} from './BasicEventEntity' @Entity({tableName: 'custom-event-votes'}) export class CustomEventVotes extends BasicEventEntity { @Property() date: Date @Property() participantId: string public setDate(date: Date): this { this.date = date return this } public setParticipantId(participantId: string): this { this.participantId = participantId return this } constructor( guildId: string, messageId: string, userId: string, username: string, eventId: string, date: Date, ) { super(guildId, messageId, userId, username, eventId) this.date = date } }