@jfln/marvin-db
Version:
biblioteca de objetos para normalizar o acesso a um banco mongo db
52 lines (41 loc) • 937 B
text/typescript
import {Entity, Property, Enum} from '@mikro-orm/core'
import {BaseEntity} from '../BaseEntity'
export abstract class BasicEventEntity extends BaseEntity {
messageId: string
userId: string
username: string
eventId: string
public setMessageId(messageId: string): this {
this.messageId = messageId
return this
}
public setUserId(userId: string): this {
this.userId = userId
return this
}
public setUsername(username: string): this {
this.username = username
return this
}
public setEventId(eventId: string): this {
this.eventId = eventId
return this
}
constructor(
guildId: string,
messageId: string,
userId: string,
username: string,
eventId: string,
) {
super(guildId)
this.messageId = messageId
this.userId = userId
this.username = username
this.eventId = eventId
}
}