All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
34 lines
702 B
Python
34 lines
702 B
Python
from pydantic import BaseModel, EmailStr
|
|
from typing import Optional
|
|
from datetime import datetime
|
|
|
|
|
|
class ContactMessageCreate(BaseModel):
|
|
full_name: str
|
|
email: EmailStr
|
|
phone: Optional[str] = None
|
|
subject: str
|
|
message: str
|
|
|
|
|
|
class ContactMessageUpdate(BaseModel):
|
|
is_read: Optional[bool] = None
|
|
status: Optional[str] = None # new, read, replied
|
|
admin_notes: Optional[str] = None
|
|
|
|
|
|
class ContactMessageResponse(BaseModel):
|
|
id: int
|
|
full_name: str
|
|
email: str
|
|
phone: Optional[str]
|
|
subject: str
|
|
message: str
|
|
created_at: datetime
|
|
is_read: bool
|
|
status: str
|
|
admin_notes: Optional[str]
|
|
|
|
class Config:
|
|
from_attributes = True
|