UNPKG

@jfln/marvin-db

Version:

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

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