UNPKG

@jfln/marvin-db

Version:

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

53 lines (42 loc) 930 B
import {Entity, Property, Enum} from '@mikro-orm/core' import {BaseEntity} from '../BaseEntity' @Entity({tableName: 'drawn-events'}) export class DrawnEvent extends BaseEntity { @Property() status: boolean @Property() channelId: string @Property() result: string @Property() title: string public setStatus(status: boolean): this { this.status = status return this } public setChannelId(channelId: string): this { this.channelId = channelId return this } public setResult(result: string): this { this.result = result return this } public setTitle(title: string): this { this.title = title return this } constructor( guildId: string, status: boolean, channelId: string, result: string, title: string, ) { super(guildId) this.status = status this.channelId = channelId this.result = result this.title = title } }