Initial commit.

Classes and interfaces in place. The QueryBuilder generics are still a work in progress
This commit is contained in:
Bradyn Glines
2018-01-18 17:19:41 -07:00
commit 92c2dea62f
25 changed files with 371 additions and 0 deletions

View File

@ -0,0 +1,5 @@
export interface IAbility {
name: string;
text: string;
type: string;
}

View File

@ -0,0 +1,4 @@
export interface IAncientAbility {
name: string;
text: string;
}

7
src/interfaces/attack.ts Normal file
View File

@ -0,0 +1,7 @@
export interface IAttack {
cost: string;
name: string;
text: string;
damage: string;
convertedEnergyCost: string;
}

37
src/interfaces/card.ts Normal file
View File

@ -0,0 +1,37 @@
import { IAbility } from '../interfaces/ability';
import { IAttack } from '../interfaces/attack';
import { ISet } from '../interfaces/set';
import { ISubType } from '../interfaces/subType';
import { ISuperType } from '../interfaces/superType';
import { IType } from '../interfaces/type';
export interface ICard {
id: number;
name: string;
imageUrl: string;
imageUrlHighRes: string;
subType: ISubType;
superType: ISuperType;
ability: IAbility;
hp: number;
number: number;
artist: string;
rarity: string;
series: string;
set: ISet;
setCode: string;
retreatCost: string;
text: string;
types: IType[];
attacks: IAttack[];
weaknesses: string[];
resistances: string[];
nationalPokedexNumber: number;
ancientTrait: string;
evolvesFrom: string;
resource(): string;
find(id: number): ICard;
all(): ICard[];
where(args: object): ICard;
}

4
src/interfaces/query.ts Normal file
View File

@ -0,0 +1,4 @@
export interface IQuery {
name: string;
value: string;
}

16
src/interfaces/set.ts Normal file
View File

@ -0,0 +1,16 @@
export interface ISet {
code: string;
name: string;
series: string;
totalCards: number;
standardLegal: boolean;
expandedLegal: boolean;
releaseDate: string;
symbolUrl: string;
ptcgoCode: string;
resource(): string;
find(id: number): ISet;
all(): ISet[];
where(args: object): ISet;
}

View File

@ -0,0 +1,4 @@
export interface ISubType {
resource(): string;
all(): ISubType[];
}

View File

@ -0,0 +1,4 @@
export interface ISuperType {
resource(): string;
all(): ISuperType[];
}

7
src/interfaces/type.ts Normal file
View File

@ -0,0 +1,7 @@
export interface IType {
type: string;
value: string;
resource(): string;
all(): IType[];
}