cs-models 0.0.743__py3-none-any.whl → 0.0.744__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,35 @@
1
+ from sqlalchemy import (
2
+ Column,
3
+ Integer,
4
+ String,
5
+ DateTime,
6
+ ForeignKey,
7
+ Boolean,
8
+ )
9
+ from datetime import datetime
10
+
11
+ from ...database import Base
12
+
13
+
14
+ class UserAutomatedDigestModel(Base):
15
+ __tablename__ = 'user_automated_digests'
16
+
17
+ id = Column(Integer, primary_key=True)
18
+ user_id = Column(String(128), nullable=False)
19
+ type = Column(String(50), nullable=False)
20
+ type_id = Column(Integer, nullable=False)
21
+ digest_name = Column(String(128), nullable=False)
22
+ created_at = Column(DateTime, nullable=False)
23
+ assistant_user_query_id = Column(
24
+ Integer,
25
+ ForeignKey('assistant_user_queries.id'),
26
+ nullable=False,
27
+ )
28
+ is_deleted = Column(Boolean, nullable=True)
29
+ updated_at = Column(
30
+ DateTime,
31
+ nullable=False,
32
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
33
+ default=lambda: datetime.utcnow(),
34
+ onupdate=lambda: datetime.utcnow(),
35
+ )
@@ -0,0 +1,19 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class UserAutomatedDigestResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error="Field cannot be blank")
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ user_id = fields.String(required=True, validate=not_blank)
13
+ type = fields.String(required=True)
14
+ type_id = fields.Integer(required=True)
15
+ digest_name = fields.String(required=True)
16
+ created_at = fields.DateTime(required=True)
17
+ assistant_user_query_id = fields.Integer(required=True)
18
+ is_deleted = fields.Boolean(allow_none=True)
19
+ updated_at = fields.DateTime(dump_only=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.743
3
+ Version: 0.0.744
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -980,6 +980,9 @@ cs_models/resources/TrialStat/test_trial_stat.py,sha256=mL8lTVYaF6IXUJ2n-JZXp4yz
980
980
  cs_models/resources/UserActivity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
981
981
  cs_models/resources/UserActivity/models.py,sha256=k_SbdhuGlmG1bPhuMxWZ_cXpcha7dsjsVU-Nyj1GUPs,767
982
982
  cs_models/resources/UserActivity/schemas.py,sha256=NH92c_PUDiYCNRIO-t1anCNf5Mg8Vyw9jC7ZZY811pk,439
983
+ cs_models/resources/UserAutomatedDigest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
984
+ cs_models/resources/UserAutomatedDigest/models.py,sha256=LeRzZ2m6kqTB3oVSHKF-xsUMuTbXhNn_pSaNEAeTPXw,996
985
+ cs_models/resources/UserAutomatedDigest/schemas.py,sha256=w93jcJERcaxqOmLjZospOCH7TRP1fafxgEDUjoTuvV4,628
983
986
  cs_models/resources/UserCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
984
987
  cs_models/resources/UserCollection/models.py,sha256=NpjpyoD0Nm_0HIqW5RjlIit9rEvwYLiO9tHf8p8tBAg,768
985
988
  cs_models/resources/UserCollection/schemas.py,sha256=AX-g-djVvDXnblrxTpSLSy-oNsv6LBKpBsBT1XNiPQA,329
@@ -1219,7 +1222,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1219
1222
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1220
1223
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1221
1224
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1222
- cs_models-0.0.743.dist-info/METADATA,sha256=4dzcBkOvwZg9I2DOvfodbxQLDZJu4OM7t2hPZT4vhuw,792
1223
- cs_models-0.0.743.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1224
- cs_models-0.0.743.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1225
- cs_models-0.0.743.dist-info/RECORD,,
1225
+ cs_models-0.0.744.dist-info/METADATA,sha256=3KvRo4dGGlnhJS992NAlUcdS1rRLkxNsYCouGYvm1Io,792
1226
+ cs_models-0.0.744.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1227
+ cs_models-0.0.744.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1228
+ cs_models-0.0.744.dist-info/RECORD,,