a working product with ugly ui

This commit is contained in:
2025-12-12 20:15:27 +05:00
parent e6d04f986f
commit 4d3085623a
77 changed files with 8750 additions and 0 deletions

43
app/schemas/share.py Normal file
View File

@@ -0,0 +1,43 @@
from pydantic import BaseModel, ConfigDict
from typing import Optional
from datetime import datetime
from uuid import UUID
class ShareBase(BaseModel):
"""Base share schema with common attributes."""
access_level: str # 'read_only', 'edit', 'guest_read_only'
requires_auth: bool = True
expires_at: Optional[datetime] = None
class ShareCreate(ShareBase):
"""Schema for creating a new share link."""
pass
class ShareUpdate(BaseModel):
"""Schema for updating share information."""
access_level: Optional[str] = None
requires_auth: Optional[bool] = None
expires_at: Optional[datetime] = None
class ShareResponse(ShareBase):
"""Response schema for share data."""
id: UUID
map_id: UUID
share_token: str
created_at: datetime
created_by: Optional[UUID] = None
model_config = ConfigDict(from_attributes=True)
class ShareValidateResponse(BaseModel):
"""Response schema for share token validation."""
valid: bool
access_level: Optional[str] = None
map_id: Optional[UUID] = None
requires_auth: bool = False
expired: bool = False