26 lines
508 B
Python
26 lines
508 B
Python
|
import uuid
|
||
|
|
||
|
from pydantic import BaseModel, Field
|
||
|
|
||
|
from barker.schemas import to_camel
|
||
|
from barker.schemas.customer import CustomerIn
|
||
|
|
||
|
|
||
|
class GuestBookIn(CustomerIn):
|
||
|
pax: int = Field(ge=0)
|
||
|
|
||
|
class Config:
|
||
|
fields = {"id_": "id"}
|
||
|
anystr_strip_whitespace = True
|
||
|
alias_generator = to_camel
|
||
|
|
||
|
|
||
|
class GuestBook(GuestBookIn):
|
||
|
id_: uuid.UUID
|
||
|
date: str
|
||
|
|
||
|
class Config:
|
||
|
fields = {"id_": "id"}
|
||
|
anystr_strip_whitespace = True
|
||
|
alias_generator = to_camel
|