@jfln/marvin-db
Version:
biblioteca de objetos para normalizar o acesso a um banco mongo db
56 lines (45 loc) • 1.16 kB
text/typescript
import {Entity, Property, Enum} from '@mikro-orm/core'
import {BaseEntity} from './BaseEntity'
import {User} from '../interfaces/User.interface'
import {Content} from '../interfaces/Content.interface'
import {AuditType} from '../types/Audit.types'
export class Audit extends BaseEntity {
auditType: string
deleted: boolean
content: Content
user: User
public setAuditType(auditType: AuditType): this {
this.auditType = auditType
return this
}
public setDeleted(deleted: boolean): this {
this.deleted = deleted
return this
}
public setContent(content: Content): this {
this.content = content
return this
}
public setUser(user: User): this {
this.user = user
return this
}
constructor(
auditType: AuditType,
deleted: boolean,
guildId: string,
content: Content,
user: User,
) {
super(guildId)
this.auditType = auditType
this.deleted = deleted
this.content = content
this.user = user
}
}