get puck events
This commit is contained in:
@ -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(
|
||||
...,
|
||||
|
Reference in New Issue
Block a user