get puck events

This commit is contained in:
GotthardG
2024-12-11 15:39:16 +01:00
parent 328a95d76e
commit 9cd0d81dac
2 changed files with 36 additions and 4 deletions

View File

@ -150,6 +150,15 @@ class SampleCreate(BaseModel):
class Config:
populate_by_name = True
class PuckEvent(BaseModel):
id: int
puck_id: int
tell_position: Optional[str] = None
event_type: str
timestamp: datetime
class Config:
from_attributes = True
class PuckBase(BaseModel):
puck_name: str
@ -177,6 +186,7 @@ class Puck(BaseModel):
puck_type: str
puck_location_in_dewar: int
dewar_id: int
events: List[PuckEvent] = []
samples: List[Sample] = [] # List of samples within this puck
class Config:
@ -308,9 +318,6 @@ class SlotSchema(BaseModel):
class Config:
from_attributes = True
class PuckEventCreate(BaseModel):
event_type: str
class SetTellPosition(BaseModel):
tell_position: str = Field(
...,