cs-models 0.0.703__py3-none-any.whl → 0.0.705__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,33 @@
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 UserSavedSearchCollectionMapModel(Base):
14
+ __tablename__ = 'user_saved_searches_collection_map'
15
+
16
+ id = Column(Integer, primary_key=True)
17
+ saved_search_id = Column(
18
+ Integer,
19
+ ForeignKey('user_saved_searches.id'),
20
+ nullable=False,
21
+ )
22
+ collection_id = Column(
23
+ Integer,
24
+ ForeignKey('collections.id'),
25
+ nullable=False,
26
+ )
27
+ updated_at = Column(
28
+ DateTime,
29
+ nullable=False,
30
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
31
+ default=lambda: datetime.utcnow(),
32
+ onupdate=lambda: datetime.utcnow(),
33
+ )
@@ -0,0 +1,14 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class UserSavedSearchCollectionMapResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error="Field cannot be blank")
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ saved_search_id = fields.Integer(required=True)
13
+ collection_id = fields.Integer(required=True)
14
+ updated_at = fields.DateTime(dump_only=True)
@@ -19,6 +19,7 @@ class WorkbookModel(Base):
19
19
  user_id = Column(String(128), nullable=False)
20
20
  workbook_name = Column(String(128), nullable=False)
21
21
  is_deleted = Column(Boolean, nullable=True)
22
+ is_public = Column(Boolean, nullable=True)
22
23
  created_at = Column(DateTime, nullable=False)
23
24
  updated_at = Column(
24
25
  DateTime,
@@ -20,5 +20,6 @@ class WorkbookResourceSchema(Schema):
20
20
  dump_only=True,
21
21
  )
22
22
  is_deleted = fields.Boolean(allow_none=True)
23
+ is_public = fields.Boolean(allow_none=True)
23
24
  created_at = fields.DateTime(required=True)
24
25
  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.703
3
+ Version: 0.0.705
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -1013,6 +1013,9 @@ cs_models/resources/UserSavedSearch/schemas.py,sha256=avoz-DNONjbtPtjZZYKQnp5aNC
1013
1013
  cs_models/resources/UserSavedSearchAccess/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1014
1014
  cs_models/resources/UserSavedSearchAccess/models.py,sha256=mMbMvvMnKMTTfjGR0_z4o42tfUI6lylx9NWK192-77g,966
1015
1015
  cs_models/resources/UserSavedSearchAccess/schemas.py,sha256=p7zykn8OsYpGHhfsy5aTxYFX1IYojaFcOC7HPURhxwg,605
1016
+ cs_models/resources/UserSavedSearchCollectionMap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1017
+ cs_models/resources/UserSavedSearchCollectionMap/models.py,sha256=NThaOOxSh1BN-w1T5QGCWbOjSojvR1-177jIS_ZPsoE,812
1018
+ cs_models/resources/UserSavedSearchCollectionMap/schemas.py,sha256=RLYzwNnlRUy8rO8X6K_QSWGeMRp_0icEiB9dviuPXVA,388
1016
1019
  cs_models/resources/UserSavedSearchDigest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1017
1020
  cs_models/resources/UserSavedSearchDigest/models.py,sha256=alX7owQynkde0zZO2nk3Qz8M_gmDWgbfRj4pTIZGWzA,940
1018
1021
  cs_models/resources/UserSavedSearchDigest/schemas.py,sha256=hhwrqEdqeSGSrASid5-n6Ll4yy2satrh37Q48wdxTZ0,503
@@ -1111,8 +1114,8 @@ cs_models/resources/WatchlistDigest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
1111
1114
  cs_models/resources/WatchlistDigest/models.py,sha256=wKWY8UGP1xZpSFKPWqJF3E5cpOhdis4KWWPRkKfRFz0,919
1112
1115
  cs_models/resources/WatchlistDigest/schemas.py,sha256=p7jZ8JFJoV2KeSUUPursHyHzbk4Ouk2TCKHLqE5ViVo,494
1113
1116
  cs_models/resources/Workbook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1114
- cs_models/resources/Workbook/models.py,sha256=4p2R8WCYYX0FOSXG0b2YhmuzKHTxYY4WZVi9X7e9GKQ,1003
1115
- cs_models/resources/Workbook/schemas.py,sha256=xcNoPzHK6ER06XA3fAvX3x7VtX47aBP0vrIqiJvUVKw,688
1117
+ cs_models/resources/Workbook/models.py,sha256=iQ3pMlaxaHhc_A1T8Fxrjsn6YR0q-NoeMyZQWHWnE2g,1050
1118
+ cs_models/resources/Workbook/schemas.py,sha256=5e-5mxEuwIn40VxYoP4K7xer8YpO0VbWXoKXCJtvj-s,736
1116
1119
  cs_models/resources/WorkbookBlock/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1117
1120
  cs_models/resources/WorkbookBlock/models.py,sha256=hYZkSFR5p6nVMUbb6ZQxvXvB6XMPlgEDliBx_k0HZ40,1659
1118
1121
  cs_models/resources/WorkbookBlock/schemas.py,sha256=lRon0US-VHMOGypaiUSZsskgFpjNEtmFEk9nFU7DLnI,1847
@@ -1165,7 +1168,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1165
1168
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1166
1169
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1167
1170
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
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,,
1171
+ cs_models-0.0.705.dist-info/METADATA,sha256=nhdu2HEy7x91TkN4ySb6Hs2kSHjqVHY4fFJHHDRanOc,792
1172
+ cs_models-0.0.705.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1173
+ cs_models-0.0.705.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1174
+ cs_models-0.0.705.dist-info/RECORD,,