cs-models 0.0.689__py3-none-any.whl → 0.0.691__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cs-models might be problematic. Click here for more details.
- cs_models/resources/SmartGrid/__init__.py +0 -0
- cs_models/resources/SmartGrid/models.py +27 -0
- cs_models/resources/SmartGrid/schemas.py +13 -0
- cs_models/resources/SmartGridCell/models.py +10 -0
- cs_models/resources/SmartGridCell/schemas.py +1 -0
- cs_models/resources/UserSavedSearchDigest/schemas.py +1 -1
- {cs_models-0.0.689.dist-info → cs_models-0.0.691.dist-info}/METADATA +1 -1
- {cs_models-0.0.689.dist-info → cs_models-0.0.691.dist-info}/RECORD +10 -7
- {cs_models-0.0.689.dist-info → cs_models-0.0.691.dist-info}/WHEEL +0 -0
- {cs_models-0.0.689.dist-info → cs_models-0.0.691.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import Column, DateTime, Boolean, ForeignKey, Integer, Text, String
|
|
4
|
+
from sqlalchemy.orm import relationship
|
|
5
|
+
|
|
6
|
+
from ...database import Base
|
|
7
|
+
from ..SmartGridCell.models import SmartGridCellModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SmartGridModel(Base):
|
|
11
|
+
__tablename__ = "smart_grids"
|
|
12
|
+
|
|
13
|
+
id = Column(Integer, primary_key=True)
|
|
14
|
+
is_deleted = Column(Boolean, nullable=True)
|
|
15
|
+
updated_at = Column(
|
|
16
|
+
DateTime,
|
|
17
|
+
nullable=False,
|
|
18
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
19
|
+
default=lambda: datetime.utcnow(),
|
|
20
|
+
onupdate=lambda: datetime.utcnow(),
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
cells = relationship(
|
|
24
|
+
"SmartGridCellModel",
|
|
25
|
+
order_by=SmartGridCellModel.row,
|
|
26
|
+
back_populates="smart_grid",
|
|
27
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from marshmallow import Schema, fields
|
|
2
|
+
from ..SmartGridCell.schemas import SmartGridCellResourceSchema
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class SmartGridResourceSchema(Schema):
|
|
6
|
+
id = fields.Integer(dump_only=True)
|
|
7
|
+
is_deleted = fields.Boolean(allow_none=True)
|
|
8
|
+
cells = fields.Nested(
|
|
9
|
+
SmartGridCellResourceSchema(exclude=("smart_grid_id",)),
|
|
10
|
+
many=True,
|
|
11
|
+
dump_only=True,
|
|
12
|
+
)
|
|
13
|
+
updated_at = fields.DateTime(dump_only=True)
|
|
@@ -10,6 +10,11 @@ class SmartGridCellModel(Base):
|
|
|
10
10
|
__tablename__ = "smart_grid_cells"
|
|
11
11
|
|
|
12
12
|
id = Column(Integer, primary_key=True)
|
|
13
|
+
smart_grid_id = Column(
|
|
14
|
+
Integer,
|
|
15
|
+
ForeignKey("smart_grids.id"),
|
|
16
|
+
nullable=False,
|
|
17
|
+
)
|
|
13
18
|
row = Column(Integer, nullable=False)
|
|
14
19
|
col = Column(Integer, nullable=False)
|
|
15
20
|
type = Column(String(20), nullable=False)
|
|
@@ -31,3 +36,8 @@ class SmartGridCellModel(Base):
|
|
|
31
36
|
user_query = relationship(
|
|
32
37
|
"AssistantUserQueryModel",
|
|
33
38
|
)
|
|
39
|
+
|
|
40
|
+
smart_grid = relationship(
|
|
41
|
+
"SmartGridModel",
|
|
42
|
+
back_populates="cells",
|
|
43
|
+
)
|
|
@@ -7,6 +7,7 @@ class SmartGridCellResourceSchema(Schema):
|
|
|
7
7
|
"""Class for AssistantCommandResource schema"""
|
|
8
8
|
|
|
9
9
|
id = fields.Integer(dump_only=True)
|
|
10
|
+
smart_grid_id = fields.Integer(required=True)
|
|
10
11
|
row = fields.Integer(required=True)
|
|
11
12
|
col = fields.Integer(required=True)
|
|
12
13
|
type = fields.String(required=True)
|
|
@@ -869,9 +869,12 @@ cs_models/resources/ScratchpadTable/schemas.py,sha256=pQPf6xpsg0ZKDM9xwesvrpdq8H
|
|
|
869
869
|
cs_models/resources/SearchLink/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
870
870
|
cs_models/resources/SearchLink/models.py,sha256=l1tPCSKHK7Wq1OUWFH72NYncEt6Q3bR0P6ii7YKoxCM,729
|
|
871
871
|
cs_models/resources/SearchLink/schemas.py,sha256=A8Y6LRgw7MHs9bihf0gZPfqp6KDm0Z8k6PJSL9WVxsc,448
|
|
872
|
+
cs_models/resources/SmartGrid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
873
|
+
cs_models/resources/SmartGrid/models.py,sha256=Ir7ZzVLoKdbUOy8XV84T1c2GVLNcDWNKXg-yaX9uYms,808
|
|
874
|
+
cs_models/resources/SmartGrid/schemas.py,sha256=tX10bmOXBump0AN4LOU-jhKRbNYiCzHsCSzHjBwsPJ8,423
|
|
872
875
|
cs_models/resources/SmartGridCell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
873
|
-
cs_models/resources/SmartGridCell/models.py,sha256=
|
|
874
|
-
cs_models/resources/SmartGridCell/schemas.py,sha256=
|
|
876
|
+
cs_models/resources/SmartGridCell/models.py,sha256=vPXX8YaVPMjq6IgGhgAy46EnmbFgGCaHlZfNEUd9hq4,1196
|
|
877
|
+
cs_models/resources/SmartGridCell/schemas.py,sha256=l6kljC4vUd1IoTwezM8UEQWnPoaJru8MqqPKlfyPdNw,766
|
|
875
878
|
cs_models/resources/Stream/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
876
879
|
cs_models/resources/Stream/models.py,sha256=wXb7yOjW82ZqmLhRcDhjLPk6_WJ5FGmvKpOcSvDMuBM,1884
|
|
877
880
|
cs_models/resources/Stream/schemas.py,sha256=ZFsdEKINFGaSBUAcQQvilq5MKpYGliZseguQoc_opxk,3111
|
|
@@ -994,7 +997,7 @@ cs_models/resources/UserSavedSearchAccess/models.py,sha256=mMbMvvMnKMTTfjGR0_z4o
|
|
|
994
997
|
cs_models/resources/UserSavedSearchAccess/schemas.py,sha256=p7zykn8OsYpGHhfsy5aTxYFX1IYojaFcOC7HPURhxwg,605
|
|
995
998
|
cs_models/resources/UserSavedSearchDigest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
996
999
|
cs_models/resources/UserSavedSearchDigest/models.py,sha256=alX7owQynkde0zZO2nk3Qz8M_gmDWgbfRj4pTIZGWzA,940
|
|
997
|
-
cs_models/resources/UserSavedSearchDigest/schemas.py,sha256=
|
|
1000
|
+
cs_models/resources/UserSavedSearchDigest/schemas.py,sha256=hhwrqEdqeSGSrASid5-n6Ll4yy2satrh37Q48wdxTZ0,503
|
|
998
1001
|
cs_models/resources/UserSearchHistoryItem/__init__.py,sha256=VAR16vegIC2J7P3s7EoILHGN1WtkSwABRkxajmlmPoc,2864
|
|
999
1002
|
cs_models/resources/UserSearchHistoryItem/models.py,sha256=GdNZsTEett2x_gU92iPbRFpozimmFWn_p9liUtXWRTk,532
|
|
1000
1003
|
cs_models/resources/UserSearchHistoryItem/schemas.py,sha256=e68GcY-1KV75VWwWCGryTufWXHL09h7b48UhxieoaUQ,747
|
|
@@ -1144,7 +1147,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
1144
1147
|
cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
|
|
1145
1148
|
cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
|
|
1146
1149
|
cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
|
|
1147
|
-
cs_models-0.0.
|
|
1148
|
-
cs_models-0.0.
|
|
1149
|
-
cs_models-0.0.
|
|
1150
|
-
cs_models-0.0.
|
|
1150
|
+
cs_models-0.0.691.dist-info/METADATA,sha256=nzIXX8FuqKSjRUsk4EyU0oI8rx49YUwb1JXzVnPQokY,792
|
|
1151
|
+
cs_models-0.0.691.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
1152
|
+
cs_models-0.0.691.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
|
|
1153
|
+
cs_models-0.0.691.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|