changed shipment_id to integers

This commit is contained in:
GotthardG
2024-11-09 08:11:03 +01:00
parent 744a365bfc
commit d5c7e7e6f3
5 changed files with 78 additions and 7 deletions

View File

@ -44,9 +44,7 @@ async def create_shipment(shipment: ShipmentCreate, db: Session = Depends(get_db
if not (contact_person or return_address or proposal):
raise HTTPException(status_code=404, detail="Associated entity not found")
shipment_id = f'SHIP-{uuid.uuid4().hex[:8].upper()}'
db_shipment = ShipmentModel(
shipment_id=shipment_id,
shipment_name=shipment.shipment_name,
shipment_date=shipment.shipment_date,
shipment_status=shipment.shipment_status,