cs-models 0.0.678__py3-none-any.whl → 0.0.679__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,36 @@
1
+ from sqlalchemy import (
2
+ Column,
3
+ Integer,
4
+ String,
5
+ DateTime,
6
+ Boolean,
7
+ ForeignKey,
8
+ )
9
+ from datetime import datetime
10
+
11
+ from ...database import Base
12
+
13
+
14
+ class WatchlistDigestModel(Base):
15
+ __tablename__ = 'watchlist_digests'
16
+
17
+ id = Column(Integer, primary_key=True)
18
+ user_id = Column(String(128), nullable=False, index=True)
19
+ watchlist_id = Column(
20
+ Integer,
21
+ ForeignKey('user_watchlists.id'),
22
+ nullable=False,
23
+ )
24
+ assistant_user_query_id = Column(
25
+ Integer,
26
+ ForeignKey('assistant_user_queries.id'),
27
+ nullable=False,
28
+ )
29
+ is_deleted = Column(Boolean, nullable=True)
30
+ updated_at = Column(
31
+ DateTime,
32
+ nullable=False,
33
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
34
+ default=lambda: datetime.utcnow(),
35
+ onupdate=lambda: datetime.utcnow(),
36
+ )
@@ -0,0 +1,16 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class WatchlistDigestResourceSchema(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
+ watchlist_id = fields.Integer(required=True)
14
+ assistant_user_query_id = fields.Integer(required=True)
15
+ is_deleted = fields.Boolean(allow_none=True)
16
+ 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.678
3
+ Version: 0.0.679
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -1080,6 +1080,9 @@ cs_models/resources/ViewPublicationTarget/schemas.py,sha256=L_WUwBOz0i4yTGdibRI_
1080
1080
  cs_models/resources/Watchlist/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1081
1081
  cs_models/resources/Watchlist/models.py,sha256=YpuJCjfZvgtK_uHJieJGAyIeC-B1Zxb-whCEKvHfsf8,1173
1082
1082
  cs_models/resources/Watchlist/schemas.py,sha256=2VLCMjiOA73pp_mtjo9kmWpgpOuXOCmlSQNwe39s8qw,1818
1083
+ cs_models/resources/WatchlistDigest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1084
+ cs_models/resources/WatchlistDigest/models.py,sha256=wKWY8UGP1xZpSFKPWqJF3E5cpOhdis4KWWPRkKfRFz0,919
1085
+ cs_models/resources/WatchlistDigest/schemas.py,sha256=p7jZ8JFJoV2KeSUUPursHyHzbk4Ouk2TCKHLqE5ViVo,494
1083
1086
  cs_models/resources/Workbook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1084
1087
  cs_models/resources/Workbook/models.py,sha256=4p2R8WCYYX0FOSXG0b2YhmuzKHTxYY4WZVi9X7e9GKQ,1003
1085
1088
  cs_models/resources/Workbook/schemas.py,sha256=xcNoPzHK6ER06XA3fAvX3x7VtX47aBP0vrIqiJvUVKw,688
@@ -1135,7 +1138,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1135
1138
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1136
1139
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1137
1140
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1138
- cs_models-0.0.678.dist-info/METADATA,sha256=9znYZzyMMtqkQnhRSy7EX6cZdMb_C9vtOr7KKhNT_GI,792
1139
- cs_models-0.0.678.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1140
- cs_models-0.0.678.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1141
- cs_models-0.0.678.dist-info/RECORD,,
1141
+ cs_models-0.0.679.dist-info/METADATA,sha256=gqnZJ0KdGOBZRZ_oJ_jsttZlwoumIlSdtrIrZdrrh34,792
1142
+ cs_models-0.0.679.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1143
+ cs_models-0.0.679.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1144
+ cs_models-0.0.679.dist-info/RECORD,,