|
@@ -0,0 +1,41 @@
|
|
|
+# -*- coding: utf-8 -*-
|
|
|
+
|
|
|
+from typing import Optional
|
|
|
+
|
|
|
+from pydantic import BaseModel
|
|
|
+
|
|
|
+
|
|
|
+# Shared properties
|
|
|
+class SpaceWeightBase(BaseModel):
|
|
|
+ project_id: Optional[str] = None
|
|
|
+ space_id: Optional[str] = None
|
|
|
+ vav_box_id: Optional[str] = None
|
|
|
+ default_weight: Optional[float] = 0.0
|
|
|
+
|
|
|
+
|
|
|
+# Properties to receive via API to creation
|
|
|
+class SpaceWeightCreate(SpaceWeightBase):
|
|
|
+ pass
|
|
|
+
|
|
|
+
|
|
|
+# Properties to receive via API on update
|
|
|
+class SpaceWeightUpdate(SpaceWeightBase):
|
|
|
+ temporary_weight: Optional[float] = 0.0
|
|
|
+ temporary_weight_update_time: Optional[str] = None
|
|
|
+
|
|
|
+
|
|
|
+class SpaceWeightInDBBase(SpaceWeightUpdate):
|
|
|
+ id: Optional[int] = None
|
|
|
+
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|
|
|
+
|
|
|
+
|
|
|
+# Additional properties to return vai API
|
|
|
+class SpaceWeight(SpaceWeightInDBBase):
|
|
|
+ pass
|
|
|
+
|
|
|
+
|
|
|
+# Additional properties stored in DB
|
|
|
+class SpaceWeightInDB(SpaceWeightInDBBase):
|
|
|
+ pass
|