add level_index so short_label can look nicer

This commit is contained in:
Laura Klünder 2024-12-19 10:56:38 +01:00
parent 6167c92e98
commit fe98f5e618
14 changed files with 89 additions and 31 deletions

View file

@ -32,6 +32,10 @@ class LevelSchema(SpecificLocationSchema, DjangoModelSchema):
title="short label (for level selector)",
description="unique among levels",
)
level_index: NonEmptyStr = APIField(
title="level index (for coordinates)",
description="unique among levels",
)
on_top_of: Union[
Annotated[PositiveInt, APIField(title="level ID", description="level this level is on top of", example=1)],
Annotated[None, APIField(title="null", description="this is a main level, not on top of any other")]