1 import { v4 as uuid } from 'uuid';
2 import { Repository } from './base';
3 export enum Buildings {
6 SPECIAL_ATTACKER_TRAINER = 'SPECIAL_ATTACKER_TRAINER',
7 SPECIAL_DEFENDER_TRAINER = 'SPECIAL_DEFENDER_TRAINER'
9 export type BuildQueue = {
12 building_type: string,
18 export class BuildQueueRepository extends Repository<BuildQueue> {
20 super('build_queues');
23 async create(owner: string, due: number, type: string, amount: number): Promise<BuildQueue> {
24 const data: BuildQueue = {
33 await this.Insert(data);
38 async list(owner: string): Promise<BuildQueue[]> {
39 return this.FindAll({owner});