UNPKG

@jfln/marvin-db

Version:

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

29 lines (22 loc) 546 B
import {Entity, Property} from '@mikro-orm/core' import {BaseEntity} from './BaseEntity' @Entity({tableName: 'answers'}) export class Answer extends BaseEntity { @Property() answer: string @Property() userId: string public setAnswer(answer: string): this { this.answer = answer return this } public setUserId(userId: string): this { this.userId = userId return this } constructor(answer: string, userId: string, guildId: string) { super(guildId) this.answer = answer this.userId = userId } }