Spaces:
Sleeping
Sleeping
File size: 1,311 Bytes
71b378e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
"""
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"
}
}
|