cs-models 0.0.728__py3-none-any.whl → 0.0.729__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.

@@ -0,0 +1,41 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import (
4
+ Column,
5
+ Integer,
6
+ DateTime,
7
+ ForeignKey,
8
+ Float,
9
+ Boolean,
10
+ )
11
+
12
+ from ...database import Base
13
+
14
+
15
+ class VAParameterConditionModel(Base):
16
+ __tablename__ = "va_parameter_conditions"
17
+
18
+ id = Column(Integer, primary_key=True)
19
+ va_parameter_id = Column(
20
+ Integer,
21
+ ForeignKey('va_parameters.id'),
22
+ nullable=False,
23
+ )
24
+ condition_id = Column(
25
+ Integer,
26
+ ForeignKey('conditions.id'),
27
+ nullable=False,
28
+ )
29
+ score = Column(
30
+ Float,
31
+ nullable=False,
32
+ )
33
+ preferred = Column(Boolean, nullable=True)
34
+ date = Column(DateTime, nullable=True)
35
+ updated_at = Column(
36
+ DateTime,
37
+ nullable=False,
38
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
39
+ default=lambda: datetime.utcnow(),
40
+ onupdate=lambda: datetime.utcnow(),
41
+ )
@@ -0,0 +1,17 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class VAParameterConditionResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ va_parameter_id = fields.Integer(required=True)
13
+ condition_id = fields.Integer(required=True)
14
+ score = fields.Float(required=True)
15
+ preferred = fields.Boolean(allow_none=True)
16
+ date = fields.DateTime(allow_none=True)
17
+ updated_at = fields.DateTime()
File without changes
File without changes
File without changes
@@ -0,0 +1,41 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import (
4
+ Column,
5
+ Integer,
6
+ DateTime,
7
+ ForeignKey,
8
+ Boolean,
9
+ Float,
10
+ )
11
+
12
+ from ...database import Base
13
+
14
+
15
+ class VAParameterInterventionModel(Base):
16
+ __tablename__ = "va_parameter_interventions"
17
+
18
+ id = Column(Integer, primary_key=True)
19
+ va_parameter_id = Column(
20
+ Integer,
21
+ ForeignKey('va_parameters.id'),
22
+ nullable=False,
23
+ )
24
+ intervention_id = Column(
25
+ Integer,
26
+ ForeignKey('interventions.id'),
27
+ nullable=False,
28
+ )
29
+ score = Column(
30
+ Float,
31
+ nullable=False,
32
+ )
33
+ preferred = Column(Boolean, nullable=True)
34
+ date = Column(DateTime, nullable=True)
35
+ updated_at = Column(
36
+ DateTime,
37
+ nullable=False,
38
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
39
+ default=lambda: datetime.utcnow(),
40
+ onupdate=lambda: datetime.utcnow(),
41
+ )
@@ -0,0 +1,17 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class VAParameterInterventionResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ va_parameter_id = fields.Integer(required=True)
13
+ intervention_id = fields.Integer(required=True)
14
+ score = fields.Float(required=True)
15
+ preferred = fields.Boolean(allow_none=True)
16
+ date = fields.DateTime(allow_none=True)
17
+ updated_at = fields.DateTime()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.728
3
+ Version: 0.0.729
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -1045,7 +1045,14 @@ cs_models/resources/VAParameter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
1045
1045
  cs_models/resources/VAParameter/models.py,sha256=C2eDFdDg7J9VEa_S6x5F5fHs4M4BWoFPleiJVhzZ8Ug,917
1046
1046
  cs_models/resources/VAParameter/schemas.py,sha256=OqTuHbXhoRwqFCuxn_PrZ11EtYtJATLHWnF5uInPopQ,728
1047
1047
  cs_models/resources/VAParameterCondition/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1048
+ cs_models/resources/VAParameterCondition/models.py,sha256=kkF6fiebAQsClvwALO4WENBRfRkuN1Y36lJaRGD1YOY,953
1049
+ cs_models/resources/VAParameterCondition/schemas.py,sha256=zq1vaQM2WApJlQs6MzxNa54NG8kf0eQSMw6pzH6z5sk,497
1050
+ cs_models/resources/VAParameterGeography/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1051
+ cs_models/resources/VAParameterGeography/models.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1052
+ cs_models/resources/VAParameterGeography/schemas.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1048
1053
  cs_models/resources/VAParameterIntervention/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1054
+ cs_models/resources/VAParameterIntervention/models.py,sha256=M3_-0BzzbmANBfQD2WoHcaYIRTvoQCLbYQmmOJogc6w,965
1055
+ cs_models/resources/VAParameterIntervention/schemas.py,sha256=Ypp2bz4_leBfyKcDsEnnGu1VJbBXkIUTXDWG5nJM2rM,503
1049
1056
  cs_models/resources/VAParameterValue/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1050
1057
  cs_models/resources/VAParameterValue/models.py,sha256=jnBN1wVgjf2zf5COPkZMEGGP05RloZoEqGzK8oTmm_4,1164
1051
1058
  cs_models/resources/VAParameterValue/schemas.py,sha256=van6N-TsxM2jtDQvILmXVR_DRdpUU2JPQ_IxpNp-_Dk,893
@@ -1191,7 +1198,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1191
1198
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1192
1199
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1193
1200
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1194
- cs_models-0.0.728.dist-info/METADATA,sha256=eRF6zvXlUi8dm9xJi-i97a28A4CfF5Iv_ercAe9fUAQ,792
1195
- cs_models-0.0.728.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1196
- cs_models-0.0.728.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1197
- cs_models-0.0.728.dist-info/RECORD,,
1201
+ cs_models-0.0.729.dist-info/METADATA,sha256=Vai_o3oKBaOme-E_jMcWVZFP9w1xClVf9G3QhcfasXk,792
1202
+ cs_models-0.0.729.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1203
+ cs_models-0.0.729.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1204
+ cs_models-0.0.729.dist-info/RECORD,,