sapce_weight.py 795 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # -*- coding: utf-8 -*-
  2. from pydantic import BaseModel
  3. # Shared properties
  4. class SpaceWeightBase(BaseModel):
  5. project_id: str | None
  6. space_id: str | None
  7. vav_box_id: str | None
  8. default_weight: float | None = 0.0
  9. # Properties to receive via API to creation
  10. class SpaceWeightCreate(SpaceWeightBase):
  11. pass
  12. # Properties to receive via API on update
  13. class SpaceWeightUpdate(SpaceWeightBase):
  14. temporary_weight: float | None = 0.0
  15. temporary_weight_update_time: str | None
  16. class SpaceWeightInDBBase(SpaceWeightUpdate):
  17. id: int | None
  18. class Config:
  19. orm_mode = True
  20. # Additional properties to return vai API
  21. class SpaceWeight(SpaceWeightInDBBase):
  22. pass
  23. # Additional properties stored in DB
  24. class SpaceWeightInDB(SpaceWeightInDBBase):
  25. pass