@jfln/marvin-db
Version:
biblioteca de objetos para normalizar o acesso a um banco mongo db
64 lines (51 loc) • 1.32 kB
text/typescript
import {Entity, Property} from '@mikro-orm/core'
import {BasicUserEntity} from './BasicUserEntity'
export class UserChallenge extends BasicUserEntity {
acceptedData: Date
challengeId: string
fullfiled: boolean
fullfiledDate: Date
token: string
public setAcceptedData(acceptedData: Date): UserChallenge {
this.acceptedData = acceptedData
return this
}
public setChallengeId(challengeId: string): UserChallenge {
this.challengeId = challengeId
return this
}
public setFullfiled(fullfiled: boolean): UserChallenge {
this.fullfiled = fullfiled
return this
}
public setFullfiledDate(fullfiledDate: Date): UserChallenge {
this.fullfiledDate = fullfiledDate
return this
}
public setToken(token: string): UserChallenge {
this.token = token
return this
}
constructor(
guildId: string,
userId: string,
acceptedData: Date,
challengeId: string,
fullfiled: boolean,
fullfiledDate: Date,
token: string,
) {
super(guildId, userId)
this.acceptedData = acceptedData
this.challengeId = challengeId
this.fullfiled = fullfiled
this.fullfiledDate = fullfiledDate
this.token = token
}
}