UNPKG

@jfln/marvin-db

Version:

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

34 lines (27 loc) 698 B
import {Entity, Property} from '@mikro-orm/core' import {BasicUserEntity} from './BasicUserEntity' @Entity({tableName: 'users-profile-background'}) export class UserProfileBackground extends BasicUserEntity { @Property() background: string @Property() bought: Date public setBackground(background: string): UserProfileBackground { this.background = background return this } public setBought(bought: Date): UserProfileBackground { this.bought = bought return this } constructor( guildId: string, userId: string, background: string, bought: Date, ) { super(guildId, userId) this.background = background this.bought = bought } }