mirror of
https://github.com/rommapp/romm.git
synced 2026-12-04 21:02:21 +01:00
Collapse the separate `sort_name` column into `name_sort_key`, which is now
the single user-settable sort field: always normalized and indexed for fast
ordering, derived from `name` by default, and overridable. A new
`name_sort_key_custom` boolean marks user/metadata overrides so they survive
renames and rescans.
- Drop the `roms.sort_name` column; repurpose migration 0085 to add
`name_sort_key_custom`.
- Derive the key via `@validates("name")` unless pinned custom; the edit
dialog, unmatch flow, and ES-DE gamelist <sortname> set custom keys.
- update_rom / scan_rom keep the columns in sync explicitly (bulk update and
construction bypass / reorder the validator).
- Frontend: edit field drives name_sort_key (empty when auto), api sends the
override only when custom, regenerated types updated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
106 lines
3.9 KiB
TypeScript
106 lines
3.9 KiB
TypeScript
/* generated using openapi-typescript-codegen -- do not edit */
|
|
/* istanbul ignore file */
|
|
/* tslint:disable */
|
|
/* eslint-disable */
|
|
import type { ManualMetadata } from './ManualMetadata';
|
|
import type { RomFileSchema } from './RomFileSchema';
|
|
import type { RomFlashpointMetadata } from './RomFlashpointMetadata';
|
|
import type { RomGamelistMetadata } from './RomGamelistMetadata';
|
|
import type { RomHasheousMetadata } from './RomHasheousMetadata';
|
|
import type { RomHLTBMetadata } from './RomHLTBMetadata';
|
|
import type { RomIGDBMetadata } from './RomIGDBMetadata';
|
|
import type { RomLaunchboxMetadata } from './RomLaunchboxMetadata';
|
|
import type { RomMetadataSchema } from './RomMetadataSchema';
|
|
import type { RomMobyMetadata } from './RomMobyMetadata';
|
|
import type { RomRAMetadata } from './RomRAMetadata';
|
|
import type { RomSSMetadata } from './RomSSMetadata';
|
|
import type { RomUserSchema } from './RomUserSchema';
|
|
import type { SaveSchema } from './SaveSchema';
|
|
import type { ScreenshotSchema } from './ScreenshotSchema';
|
|
import type { SiblingRomSchema } from './SiblingRomSchema';
|
|
import type { StateSchema } from './StateSchema';
|
|
import type { UserCollectionSchema } from './UserCollectionSchema';
|
|
import type { UserNoteSchema } from './UserNoteSchema';
|
|
export type DetailedRomSchema = {
|
|
id: number;
|
|
igdb_id: (number | null);
|
|
sgdb_id: (number | null);
|
|
moby_id: (number | null);
|
|
ss_id: (number | null);
|
|
ra_id: (number | null);
|
|
launchbox_id: (number | null);
|
|
hasheous_id: (number | null);
|
|
tgdb_id: (number | null);
|
|
flashpoint_id: (string | null);
|
|
hltb_id: (number | null);
|
|
gamelist_id: (string | null);
|
|
libretro_id: (string | null);
|
|
platform_id: number;
|
|
platform_slug: string;
|
|
platform_fs_slug: string;
|
|
platform_custom_name: (string | null);
|
|
platform_display_name: string;
|
|
fs_name: string;
|
|
fs_name_no_tags: string;
|
|
fs_name_no_ext: string;
|
|
fs_extension: string;
|
|
fs_path: string;
|
|
fs_size_bytes: number;
|
|
name: (string | null);
|
|
name_sort_key: (string | null);
|
|
name_sort_key_custom: boolean;
|
|
slug: (string | null);
|
|
summary: (string | null);
|
|
alternative_names: Array<string>;
|
|
youtube_video_id: (string | null);
|
|
metadatum: RomMetadataSchema;
|
|
igdb_metadata: (RomIGDBMetadata | null);
|
|
moby_metadata: (RomMobyMetadata | null);
|
|
ss_metadata: (RomSSMetadata | null);
|
|
launchbox_metadata: (RomLaunchboxMetadata | null);
|
|
hasheous_metadata: (RomHasheousMetadata | null);
|
|
flashpoint_metadata: (RomFlashpointMetadata | null);
|
|
hltb_metadata: (RomHLTBMetadata | null);
|
|
gamelist_metadata: (RomGamelistMetadata | null);
|
|
manual_metadata: (ManualMetadata | null);
|
|
path_cover_small: (string | null);
|
|
path_cover_large: (string | null);
|
|
url_cover: (string | null);
|
|
has_manual: boolean;
|
|
has_manual_files: boolean;
|
|
has_soundtrack: boolean;
|
|
path_manual: (string | null);
|
|
url_manual: (string | null);
|
|
path_video: (string | null);
|
|
is_identifying?: boolean;
|
|
is_unidentified: boolean;
|
|
is_identified: boolean;
|
|
revision: (string | null);
|
|
regions: Array<string>;
|
|
languages: Array<string>;
|
|
tags: Array<string>;
|
|
crc_hash: (string | null);
|
|
md5_hash: (string | null);
|
|
sha1_hash: (string | null);
|
|
ra_hash: (string | null);
|
|
has_simple_single_file: boolean;
|
|
has_nested_single_file: boolean;
|
|
has_multiple_files: boolean;
|
|
full_path: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
missing_from_fs: boolean;
|
|
has_notes: boolean;
|
|
rom_user: RomUserSchema;
|
|
merged_screenshots: Array<string>;
|
|
merged_ra_metadata: (RomRAMetadata | null);
|
|
files: Array<RomFileSchema>;
|
|
sibling_roms: Array<SiblingRomSchema>;
|
|
user_saves: Array<SaveSchema>;
|
|
user_states: Array<StateSchema>;
|
|
user_screenshots: Array<ScreenshotSchema>;
|
|
user_collections: Array<UserCollectionSchema>;
|
|
all_user_notes: Array<UserNoteSchema>;
|
|
};
|
|
|