UNPKG

@jfln/marvin-db

Version:

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

44 lines (35 loc) 816 B
import {Entity, Property} from '@mikro-orm/core' import {BasicUserEntity} from './BasicUserEntity' @Entity({tableName: 'users'}) export class User extends BasicUserEntity { @Property() aboutMe: string @Property() channelVerify: string @Property() name: string public setAboutMe(aboutMe: string): User { this.aboutMe = aboutMe return this } public setChannelVerify(channelVerify: string): User { this.channelVerify = channelVerify return this } public setName(name: string): User { this.name = name return this } constructor( guildId: string, userId: string, aboutMe: string, channelVerify: string, name: string, ) { super(guildId, userId) this.aboutMe = aboutMe this.channelVerify = channelVerify this.name = name } }