UNPKG

@jfln/marvin-db

Version:

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

34 lines (27 loc) 686 B
import {Entity, Property, Enum} from '@mikro-orm/core' import {BasicUserEntity} from './BasicUserEntity' @Entity({tableName: 'users-transactions'}) export class UserTransaction extends BasicUserEntity { @Property() description: string @Property() value: number public setDescription(description: string): UserTransaction { this.description = description return this } public setValue(value: number): UserTransaction { this.value = value return this } constructor( guildId: string, userId: string, description: string, value: number, ) { super(guildId, userId) this.description = description this.value = value } }