updated models and schemas for shipments and dewars

This commit is contained in:
GotthardG
2024-11-11 11:43:49 +01:00
parent d5c7e7e6f3
commit 701c42c0dd
8 changed files with 96 additions and 91 deletions

View File

@ -17,10 +17,7 @@ async def get_dewars(db: Session = Depends(get_db)):
@router.post("/", response_model=DewarSchema, status_code=status.HTTP_201_CREATED)
async def create_dewar(dewar: DewarCreate, db: Session = Depends(get_db)) -> DewarSchema:
dewar_id = f'DEWAR-{uuid.uuid4().hex[:8].upper()}'
db_dewar = DewarModel(
id=dewar_id,
dewar_name=dewar.dewar_name,
tracking_number=dewar.tracking_number,
status=dewar.status,