This commit is contained in:
Bernhard Radermacher
2025-09-01 11:36:22 +00:00
parent eb1d8d793c
commit 292e296f01
26 changed files with 461 additions and 410 deletions

View File

@@ -0,0 +1,23 @@
from typing import Annotated
from pydantic import BaseModel, Field
from .status import Status
class Contact(BaseModel):
id: int
code: str
address: str | None
notes: str | None
status: Status | None
class ContactCreate(BaseModel):
code: str = Field(max_length=80)
address: Annotated[str | None, Field(max_length=253)] = None
notes: str | None = None
class ContactUpdate(ContactCreate):
code: Annotated[str | None, Field(max_length=80)] = None