Extra field settings UI done

This commit is contained in:
Donkie
2024-01-15 22:13:55 +01:00
parent 483c48151b
commit f9787158b8
4 changed files with 199 additions and 91 deletions

View File

@@ -38,6 +38,7 @@ class ExtraFieldType(Enum):
class ExtraFieldParameters(BaseModel):
name: str = Field(description="Nice name", min_length=1, max_length=128)
order: int = Field(0, description="Order of the field")
unit: Optional[str] = Field(None, description="Unit of the value", min_length=1, max_length=16)
field_type: ExtraFieldType = Field(description="Type of the field")
default_value: Optional[str] = Field(None, description="Default value of the field")