wip
This commit is contained in:
23
app/routers/models/contact.py
Normal file
23
app/routers/models/contact.py
Normal 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
|
||||
Reference in New Issue
Block a user