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

File without changes
@@ -0,0 +1,29 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import (
4
+ Column,
5
+ Integer,
6
+ DateTime,
7
+ String,
8
+ Text,
9
+ )
10
+
11
+ from ...database import Base
12
+
13
+
14
+ class CampaignTrackerModel(Base):
15
+ __tablename__ = "campaign_tracker"
16
+
17
+ id = Column(Integer, primary_key=True)
18
+ name = Column(String(128), nullable=False)
19
+ email = Column(String(128), nullable=True)
20
+ company = Column(String(128), nullable=True)
21
+ promo_code = Column(String(50), nullable=True)
22
+ campaign_description = Column(Text, nullable=True)
23
+ updated_at = Column(
24
+ DateTime,
25
+ nullable=False,
26
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
27
+ default=lambda: datetime.utcnow(),
28
+ onupdate=lambda: datetime.utcnow(),
29
+ )
@@ -0,0 +1,17 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class CampaignTrackerResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ name = fields.String(required=True)
13
+ email = fields.String(allow_none=True)
14
+ company = fields.String(allow_none=True)
15
+ promo_code = fields.String(allow_none=True)
16
+ campaign_description = fields.String(allow_none=True)
17
+ updated_at = fields.DateTime(dump_only=True)
@@ -19,8 +19,8 @@ class SalesEstimateModel(Base):
19
19
  fiscal_year = Column(Integer, nullable=True)
20
20
  request_id = Column(String(20), nullable=True)
21
21
  metric = Column(String(50), nullable=True)
22
- drug_name = Column(String(128), nullable=False, index=True),
23
- company_name = Column(String(128), nullable=True, index=True),
22
+ drug_name = Column(String(128), nullable=False, index=True)
23
+ company_name = Column(String(128), nullable=True, index=True)
24
24
  currency = Column(String(20), nullable=True)
25
25
  fiscal_end_date = Column(DateTime, nullable=True)
26
26
  estimate_date = Column(DateTime, nullable=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.701
3
+ Version: 0.0.703
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -79,6 +79,9 @@ cs_models/resources/BiomarkerSyn/schemas.py,sha256=YTv8CY6hcJcVRpQKlSdZdyD2jwF1V
79
79
  cs_models/resources/CTProductsView/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
80
  cs_models/resources/CTProductsView/models.py,sha256=MhnIRsYjgkkuSSUF6JkqrHzFMqzbbSsIU-CkEjSEEDI,1042
81
81
  cs_models/resources/CTProductsView/schemas.py,sha256=7lU2GfAVYxVek1TG-w5qdFA8Th2KZvfOtkLfMl5lDo4,1254
82
+ cs_models/resources/CampaignTracker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
+ cs_models/resources/CampaignTracker/models.py,sha256=J-bspCBAmIiDi6ISKujmAovEteH2IlHi_SVA5nSqzgQ,789
84
+ cs_models/resources/CampaignTracker/schemas.py,sha256=J3uS2XjpoHpdZoKL4VDQrIpznzY0-f74W2okB3_8Kso,507
82
85
  cs_models/resources/CatalystConcept/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
86
  cs_models/resources/CatalystConcept/models.py,sha256=CNRm9nGS5PWujiDRpI1zKfo4d59gYQKtPglSF6Tk19c,945
84
87
  cs_models/resources/CatalystConcept/schemas.py,sha256=4w1cUhutUB_mKXBcvyHC9kyb0QrxNKgxoKF7PUQd-0w,507
@@ -861,7 +864,7 @@ cs_models/resources/Sales/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
861
864
  cs_models/resources/Sales/models.py,sha256=gJeTtpVVKo3OKb5fYRuxdLorPrXV7RJh4b0-YFIywDg,954
862
865
  cs_models/resources/Sales/schemas.py,sha256=GTA2CNBOxn65mUornpk2eGM4exkPm7W7zO1ZJ4yiLW8,559
863
866
  cs_models/resources/SalesEstimate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
864
- cs_models/resources/SalesEstimate/models.py,sha256=h_pZ9FKjVyb7JFPH45wuNQDyYGJw_t7A0LjtbVgU_24,1272
867
+ cs_models/resources/SalesEstimate/models.py,sha256=VhnOh0qDzsIk286FVPhfiXsjEH_C1Vxl1Ff_vqXWW6Q,1270
865
868
  cs_models/resources/SalesEstimate/schemas.py,sha256=T-he-qQw7mAfbCfoYWG08YhHAofaCSuPp8fdkSaIA1I,913
866
869
  cs_models/resources/SalesEstimateCompany/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
867
870
  cs_models/resources/SalesEstimateCompany/models.py,sha256=wnbMVuQKVv08B-_VOgGtqHgToTbmfTCjdUxPW0Nkcuo,940
@@ -1162,7 +1165,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1162
1165
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1163
1166
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1164
1167
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1165
- cs_models-0.0.701.dist-info/METADATA,sha256=1ugB4y9IEIRpLg5Qw1vpSm6vFfMRQnupv9BNxFx3ivE,792
1166
- cs_models-0.0.701.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1167
- cs_models-0.0.701.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1168
- cs_models-0.0.701.dist-info/RECORD,,
1168
+ cs_models-0.0.703.dist-info/METADATA,sha256=XLEMD_Wdn8LRS6xA4w45VWcF_yobU3bgyDrKz6ghfAk,792
1169
+ cs_models-0.0.703.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1170
+ cs_models-0.0.703.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1171
+ cs_models-0.0.703.dist-info/RECORD,,