a working product with ugly ui
This commit is contained in:
32
app/schemas/map.py
Normal file
32
app/schemas/map.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
from uuid import UUID
|
||||
|
||||
|
||||
class MapBase(BaseModel):
|
||||
"""Base map schema with common attributes."""
|
||||
name: str
|
||||
description: Optional[str] = None
|
||||
|
||||
|
||||
class MapCreate(MapBase):
|
||||
"""Schema for creating a new map."""
|
||||
pass
|
||||
|
||||
|
||||
class MapUpdate(BaseModel):
|
||||
"""Schema for updating map information."""
|
||||
name: Optional[str] = None
|
||||
description: Optional[str] = None
|
||||
|
||||
|
||||
class MapResponse(MapBase):
|
||||
"""Response schema for map data."""
|
||||
id: UUID
|
||||
owner_id: UUID
|
||||
is_default_public: bool
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
Reference in New Issue
Block a user