cs-models 0.0.704__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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.704
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
@@ -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.704.dist-info/METADATA,sha256=NqEmm8LK13zEIaAB8u_nunjB6YoYcRqGJYGM3hksHXo,792
1169
- cs_models-0.0.704.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1170
- cs_models-0.0.704.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1171
- cs_models-0.0.704.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,,