mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-11-10 03:45:56 +00:00
feat(*): Update pokedex entry data structure and re-add error handling
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user