add: worksop entry & end date for events/workshops & summary change

This commit is contained in:
2026-07-26 14:17:11 +01:00
parent 5b434abd06
commit ce91ff46e0
11 changed files with 189 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
from typing import Union, Literal
from typing import Union, Literal, Optional
from pydantic import BaseModel, Field
## File doesn't do anything, its just an outline for the schemas
@@ -11,6 +11,7 @@ class BaseEntry(BaseModel):
class Event(BaseEntry):
type: Literal["event"] = "event"
date_time: str = Field(description="Date and time of the event")
end_date: Optional[str] = Field(default=None, description="End date and time if multi-day event")
location: str = Field(description="Location of the event")
class Opportunity(BaseEntry):
@@ -18,4 +19,10 @@ class Opportunity(BaseEntry):
deadline: str = Field(description="What is the deadline in the format of dd-mm-yy")
location: str = Field(description="Location of entry")
EntrySchema = Union[Event, Opportunity]
class Workshop(BaseEntry):
type: Literal["workshop"] = "workshop"
date_time: str = Field(description="Start date and time of the workshop")
end_date: Optional[str] = Field(default=None, description="End date and time if multi-day workshop")
location: str = Field(description="Location of the workshop")
EntrySchema = Union[Event, Opportunity, Workshop]