PROFILEPHOTO: profilePhotoUrl computed field on GerbilDto

GET /gerbils/{id}: loads first photo by sortOrder (2 queries, no N+1).
GET /gerbils list: batch-loads first photos for the page in one IN query.
profilePhotoUrl = /photos/files/{fileName} or null. No migration.
3 new tests: no-photo=null, sortOrder priority, list batch.
This commit is contained in:
2026-06-07 03:19:00 +02:00
parent c1b215d06f
commit 70803efa1f
3 changed files with 111 additions and 6 deletions

View File

@@ -29,7 +29,8 @@ namespace GerbilManagerWebAPI.Dtos
List<string> CharacterTraits,
string? CharacterNote,
bool? IsDeaf,
bool IsResident);
bool IsResident,
string? ProfilePhotoUrl);
public record LitterDto(
Guid Id,