UNPKG

@jfln/marvin-db

Version:

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

43 lines (34 loc) 752 B
import {Entity, Property, Enum} from '@mikro-orm/core' import {BaseEntity} from '../BaseEntity' @Entity({tableName: 'hashtag-events'}) export class HashtagEvent extends BaseEntity { @Property() coins: number @Property() hashtag: string @Property() status: boolean public setCoins(coins: number): this { this.coins = coins return this } public setHashtag(hashtag: string): this { this.hashtag = hashtag return this } public setStatus(status: boolean): this { this.status = status return this } constructor( guildId: string, coins: number, hashtag: string, status: boolean, ) { super(guildId) this.coins = coins this.hashtag = hashtag this.status = status } }