@jfln/marvin-db
Version:
biblioteca de objetos para normalizar o acesso a um banco mongo db
29 lines (22 loc) • 546 B
text/typescript
import {Entity, Property} from '@mikro-orm/core'
import {BaseEntity} from './BaseEntity'
export class Answer extends BaseEntity {
answer: string
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
}
}