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

@@ -20,6 +20,7 @@ class DigestModel(Base):
20
20
  ForeignKey('user_saved_searches.id'),
21
21
  nullable=False,
22
22
  )
23
+ user_id = Column(String(128), nullable=True, index=True)
23
24
  type = Column(String(128), nullable=False)
24
25
  description = Column(String(256), nullable=False)
25
26
  created_at = Column(DateTime, nullable=True)
@@ -10,6 +10,7 @@ class DigestResourceSchema(Schema):
10
10
 
11
11
  id = fields.Integer(dump_only=True)
12
12
  saved_search_id = fields.Integer(required=True)
13
+ user_id = fields.String(allow_none=True)
13
14
  type = fields.String(required=True)
14
15
  description = fields.String(required=True)
15
16
  created_at = fields.DateTime()
File without changes
@@ -0,0 +1,30 @@
1
+ from sqlalchemy import (
2
+ Column,
3
+ Integer,
4
+ String,
5
+ DateTime,
6
+ ForeignKey,
7
+ )
8
+ from datetime import datetime
9
+
10
+ from ...database import Base
11
+
12
+
13
+ class NotificationReadStatusModel(Base):
14
+ __tablename__ = 'notifications_read_status'
15
+
16
+ id = Column(Integer, primary_key=True)
17
+ notification_id = Column(
18
+ Integer,
19
+ ForeignKey('notifications.id'),
20
+ nullable=False,
21
+ )
22
+ user_id = Column(String(128), nullable=False, index=True)
23
+ seen_at = Column(DateTime, nullable=True)
24
+ updated_at = Column(
25
+ DateTime,
26
+ nullable=False,
27
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
28
+ default=lambda: datetime.utcnow(),
29
+ onupdate=lambda: datetime.utcnow(),
30
+ )
@@ -0,0 +1,15 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class NotificationReadStatusResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ notification_id = fields.Integer(required=True)
13
+ user_id = fields.String(required=True)
14
+ seen_at = fields.DateTime(allow_none=True)
15
+ updated_at = fields.DateTime()
@@ -22,6 +22,9 @@ class UserSavedSearchAccessModel(Base):
22
22
  nullable=False,
23
23
  )
24
24
  is_deleted = Column(Boolean, nullable=True)
25
+ instant_notification = Column(Boolean, nullable=True)
26
+ daily_digest = Column(Boolean, nullable=True)
27
+ weekly_digest = Column(Boolean, nullable=True)
25
28
  updated_at = Column(
26
29
  DateTime,
27
30
  nullable=False,
@@ -12,4 +12,7 @@ class UserSavedSearchAccessResourceSchema(Schema):
12
12
  user_id = fields.String(required=True, validate=not_blank)
13
13
  saved_search_id = fields.Integer(required=True)
14
14
  is_deleted = fields.Boolean(allow_none=True)
15
+ instant_notification = fields.Boolean(allow_none=True)
16
+ daily_digest = fields.Boolean(allow_none=True)
17
+ weekly_digest = fields.Boolean(allow_none=True)
15
18
  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.642
3
+ Version: 0.0.644
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -243,8 +243,8 @@ cs_models/resources/DesignationOutbox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCe
243
243
  cs_models/resources/DesignationOutbox/models.py,sha256=UpJZs_JQxVr7wxMLexO-yc8Hc26-btiXZnAAuLcmT9g,919
244
244
  cs_models/resources/DesignationOutbox/schemas.py,sha256=qMvxAvy4dcUoB1-yhUAYtCAGGvJixTfviROjI91VcC0,493
245
245
  cs_models/resources/Digest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
246
- cs_models/resources/Digest/models.py,sha256=m95Knoddoib8MESk3txzGH1LpXwKMz3a2cr2Qe8AlE0,847
247
- cs_models/resources/Digest/schemas.py,sha256=hg_DBRuZgb2CwmCiSTrWScRkq14hYJ7W3iEX9AmXosI,456
246
+ cs_models/resources/Digest/models.py,sha256=YCYCiBNKqoOcgKqoCQIitREahNglY-jbG690QuLgwtg,908
247
+ cs_models/resources/Digest/schemas.py,sha256=mcNK2kyCSqxzbYbnFgZcNGe0OYKT4dxHUKanBGbyE_4,501
248
248
  cs_models/resources/DigestNotification/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
249
249
  cs_models/resources/DigestNotification/models.py,sha256=9zNVi4Hsjl_ove6aReQivP7ocJy4dxr-SUoF9XI-X90,763
250
250
  cs_models/resources/DigestNotification/schemas.py,sha256=n7jih5IiRGRwD8fQr5UfEHb0NRJuWp7HOBGXcHEWXEs,360
@@ -659,6 +659,9 @@ cs_models/resources/Note/schemas.py,sha256=9tRe8druOfK9GWLl_VDGJ9KwxWoBnwp5gdHSa
659
659
  cs_models/resources/Notification/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
660
660
  cs_models/resources/Notification/models.py,sha256=Wq2_cjkupmCSxwRnSF9guPILZZ36__XNOovn28oVAQc,1277
661
661
  cs_models/resources/Notification/schemas.py,sha256=jyWUF9LWadk08LR7Pc9KOjctl_0A659lHlRX63V9ZQk,887
662
+ cs_models/resources/NotificationReadStatus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
663
+ cs_models/resources/NotificationReadStatus/models.py,sha256=b0h2hootl93wPOyyTk7uKtTs4u9BPCMIaOo7tHRp0Bc,786
664
+ cs_models/resources/NotificationReadStatus/schemas.py,sha256=x_-kXky_TGZqWO1EgKTW6QWi2vng7k0eWNT9T58aHh4,408
662
665
  cs_models/resources/OCRJobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
663
666
  cs_models/resources/OCRJobs/models.py,sha256=wIRR1RtnT0hzjEyq5Fx09Z5oaxjZwuBrdaIJeE132JI,1070
664
667
  cs_models/resources/OCRJobs/schemas.py,sha256=jKlkjXzSGiamEfXr5xuQxzbQgswDg91s6YDTQFljEeA,716
@@ -918,8 +921,8 @@ cs_models/resources/UserSavedSearch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
918
921
  cs_models/resources/UserSavedSearch/models.py,sha256=3xqXAS-IcLQ_EV9KppG9xpdrRVSQ7md_dbj1KING4rs,1071
919
922
  cs_models/resources/UserSavedSearch/schemas.py,sha256=n8_F6j5vm3JX_fJokOZMRGf6TEXPdBRrUDOQjCrvWsY,686
920
923
  cs_models/resources/UserSavedSearchAccess/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
921
- cs_models/resources/UserSavedSearchAccess/models.py,sha256=bOiqinxEjyiZSbTtxBsIP03McTa2l5A0dJiR7ItQ70w,807
922
- cs_models/resources/UserSavedSearchAccess/schemas.py,sha256=aaNA7X_ckV_gTzpGwGnMNQJSxQMshAHB_JBAkL597I4,443
924
+ cs_models/resources/UserSavedSearchAccess/models.py,sha256=mMbMvvMnKMTTfjGR0_z4o42tfUI6lylx9NWK192-77g,966
925
+ cs_models/resources/UserSavedSearchAccess/schemas.py,sha256=p7zykn8OsYpGHhfsy5aTxYFX1IYojaFcOC7HPURhxwg,605
923
926
  cs_models/resources/UserSearchHistoryItem/__init__.py,sha256=VAR16vegIC2J7P3s7EoILHGN1WtkSwABRkxajmlmPoc,2864
924
927
  cs_models/resources/UserSearchHistoryItem/models.py,sha256=GdNZsTEett2x_gU92iPbRFpozimmFWn_p9liUtXWRTk,532
925
928
  cs_models/resources/UserSearchHistoryItem/schemas.py,sha256=e68GcY-1KV75VWwWCGryTufWXHL09h7b48UhxieoaUQ,747
@@ -1054,7 +1057,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1054
1057
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1055
1058
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1056
1059
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1057
- cs_models-0.0.642.dist-info/METADATA,sha256=qB1RtAuYqvbrq4DAD_dCwaVSbRw9UDVBJy0Qt_54_a0,792
1058
- cs_models-0.0.642.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1059
- cs_models-0.0.642.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1060
- cs_models-0.0.642.dist-info/RECORD,,
1060
+ cs_models-0.0.644.dist-info/METADATA,sha256=kS34kJINb_v1lpE6jbx9W8LkMRKgek_0JfQ4Mi2yj90,792
1061
+ cs_models-0.0.644.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1062
+ cs_models-0.0.644.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1063
+ cs_models-0.0.644.dist-info/RECORD,,