feat(pokemon): store official data identity separate from display ID

Add data_id and data_identifier to pokemon schema
Use official data ID as internal route ID for non-event pokemon
Prevent applying fetched data with mismatched ID to existing pokemon
This commit is contained in:
2026-05-04 00:06:22 +08:00
parent 8dfd03f3d2
commit fa06d24826
6 changed files with 103 additions and 44 deletions

View File

@@ -151,6 +151,8 @@ export interface EditHistoryEntry {
export interface Pokemon extends EditInfo {
id: number;
dataId?: number | null;
dataIdentifier?: string;
displayId: number;
name: string;
baseName?: string;
@@ -534,6 +536,8 @@ export type ConfigType =
| 'game-versions';
export interface PokemonPayload {
dataId?: number | null;
dataIdentifier?: string;
displayId: number;
isEventItem: boolean;
name: string;