zappyzep/src/data/DashboardUsers.ts

22 lines
534 B
TypeScript
Raw Normal View History

2019-05-26 00:13:42 +03:00
import { getRepository, Repository } from "typeorm";
import { DashboardUser } from "./entities/DashboardUser";
import { BaseRepository } from "./BaseRepository";
export class DashboardUsers extends BaseRepository {
private dashboardUsers: Repository<DashboardUser>;
constructor() {
super();
this.dashboardUsers = getRepository(DashboardUser);
}
getByGuildAndUserId(guildId, userId) {
return this.dashboardUsers.findOne({
where: {
guild_id: guildId,
user_id: userId,
},
});
}
2019-05-26 00:13:42 +03:00
}