Spaces:
Sleeping
Sleeping
| """ | |
| Session Notes Model for D&D Campaign Manager | |
| """ | |
| from pydantic import BaseModel, Field | |
| from datetime import datetime | |
| from typing import Optional | |
| class SessionNotes(BaseModel): | |
| """Model for campaign session notes""" | |
| id: str = Field(..., description="Unique identifier for session notes") | |
| campaign_id: str = Field(..., description="Campaign this session belongs to") | |
| session_number: int = Field(..., description="Session number") | |
| notes: str = Field(..., description="Freeform session notes content") | |
| uploaded_at: datetime = Field(default_factory=datetime.now, description="When notes were uploaded") | |
| file_name: Optional[str] = Field(None, description="Original filename if uploaded from file") | |
| file_type: Optional[str] = Field(None, description="File extension (.txt, .md, .docx, .pdf)") | |
| class Config: | |
| json_schema_extra = { | |
| "example": { | |
| "id": "the-forgotten-forge-session-3", | |
| "campaign_id": "the-forgotten-forge", | |
| "session_number": 3, | |
| "notes": "Session 3 - The Lost Temple\n\nThe party arrived at the temple ruins...", | |
| "uploaded_at": "2024-01-15T20:30:00", | |
| "file_name": "session_3_notes.txt", | |
| "file_type": ".txt" | |
| } | |
| } | |