cs-models 0.0.608__py3-none-any.whl → 0.0.609__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,40 @@
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 InterventionInterventionSalesDataModel(Base):
16
+ __tablename__ = "intervention_intervention_sales_data"
17
+
18
+ id = Column(Integer, primary_key=True)
19
+ intervention_id = Column(
20
+ Integer,
21
+ ForeignKey('interventions.id'),
22
+ nullable=False,
23
+ )
24
+ intervention_sales_data_id = Column(
25
+ Integer,
26
+ ForeignKey('intervention_sales_data.id'),
27
+ nullable=False,
28
+ )
29
+ score = Column(
30
+ Float,
31
+ nullable=False,
32
+ )
33
+ is_deleted = Column(Boolean, nullable=True)
34
+ updated_at = Column(
35
+ DateTime,
36
+ nullable=False,
37
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
38
+ default=lambda: datetime.utcnow(),
39
+ onupdate=lambda: datetime.utcnow(),
40
+ )
@@ -0,0 +1,16 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class InterventionInterventionSalesDataResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ intervention_id = fields.Integer(required=True)
13
+ intervention_sales_data_id = fields.Integer(required=True)
14
+ score = fields.Float(required=True)
15
+ is_deleted = fields.Boolean(allow_none=True)
16
+ updated_at = fields.DateTime()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.608
3
+ Version: 0.0.609
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -385,6 +385,9 @@ cs_models/resources/InterventionDesc/schemas.py,sha256=O5oktBmkrah54lFh4a6l0dTTc
385
385
  cs_models/resources/InterventionFiles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
386
386
  cs_models/resources/InterventionFiles/models.py,sha256=_taStFnqCrmD2t1HkxjuRQ87uym6t2imRd9Pd0AfxTk,1024
387
387
  cs_models/resources/InterventionFiles/schemas.py,sha256=cGg6eduhQc0_W2iHcOTtck7HDna63T8TmOGdfJ19Grk,496
388
+ cs_models/resources/InterventionInterventionSalesData/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
389
+ cs_models/resources/InterventionInterventionSalesData/models.py,sha256=xJVwvxar0-cn3iqW7Q5YcZ-9kFjH0SmfvkMvStASyV4,964
390
+ cs_models/resources/InterventionInterventionSalesData/schemas.py,sha256=TI8tu0GdtiVjUlf_4WBytVaPmSBVX75f67im7OMbkUQ,481
388
391
  cs_models/resources/InterventionMilestone/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
389
392
  cs_models/resources/InterventionMilestone/models.py,sha256=LhPGrINpLjmxiuxnVgfT3QXOY0esGd6bfBRvbMBTtDo,1239
390
393
  cs_models/resources/InterventionMilestone/schemas.py,sha256=f-37enqMKIwQ_BLVnc93dLJGzZpR_4cOz-gftvJAzCw,1321
@@ -994,7 +997,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
994
997
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
995
998
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
996
999
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
997
- cs_models-0.0.608.dist-info/METADATA,sha256=vefCFblEVxO2QANXVA4gBjDO1RI0pIBHm71L0pXvweA,791
998
- cs_models-0.0.608.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
999
- cs_models-0.0.608.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1000
- cs_models-0.0.608.dist-info/RECORD,,
1000
+ cs_models-0.0.609.dist-info/METADATA,sha256=2SsUh8ukwoRtz7ncVlRG8yL6Dh07lg32gUHChHiz480,791
1001
+ cs_models-0.0.609.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1002
+ cs_models-0.0.609.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1003
+ cs_models-0.0.609.dist-info/RECORD,,