feat(*): Update pokedex entry data structure and re-add error handling

This commit is contained in:
Josh Creek
2024-07-14 16:16:18 +01:00
parent 90f6bd6e75
commit 7467a4425f
9 changed files with 21000 additions and 4187 deletions
+22 -2
View File
@@ -3,13 +3,21 @@ import mongoose, { Schema, Document } from 'mongoose';
export interface PokedexEntry extends Document {
pokedexNumber: number;
boxPlacement: { box: number; row: number; column: number };
boxPlacementForms: { box: number; row: number; column: number };
pokemon: string;
form: string;
canGigantamax: boolean;
regionToCatchIn: string;
gamesToCatchIn: string[];
regionToEvolveIn: string;
notes: string;
evolutionInformation: string;
catchInformation: [
{
game: string;
location: string;
notes: string;
}
];
}
const pokedexEntrySchema = new Schema<PokedexEntry>({
@@ -19,13 +27,25 @@ const pokedexEntrySchema = new Schema<PokedexEntry>({
row: Number,
column: Number
},
boxPlacementForms: {
box: Number,
row: Number,
column: Number
},
pokemon: String,
form: String,
canGigantamax: Boolean,
regionToCatchIn: String,
gamesToCatchIn: Array<string>,
regionToEvolveIn: String,
notes: String
evolutionInformation: String,
catchInformation: [
{
game: String,
location: String,
notes: String
}
]
});
export default mongoose.model<PokedexEntry>('PokedexEntry', pokedexEntrySchema);