cs-models 0.0.670__py3-none-any.whl → 0.0.671__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,29 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import (
4
+ Column,
5
+ Integer,
6
+ DateTime,
7
+ Text,
8
+ String,
9
+ Boolean,
10
+ )
11
+
12
+ from ...database import Base
13
+
14
+
15
+ class SearchLinkModel(Base):
16
+ __tablename__ = "search_links"
17
+
18
+ id = Column(Integer, primary_key=True)
19
+ user_id = Column(String(128), nullable=False)
20
+ type = Column(String(50), nullable=False)
21
+ payload = Column(Text, nullable=True)
22
+ is_active = Column(Boolean, nullable=True)
23
+ updated_at = Column(
24
+ DateTime,
25
+ nullable=False,
26
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
27
+ default=lambda: datetime.utcnow(),
28
+ onupdate=lambda: datetime.utcnow(),
29
+ )
@@ -0,0 +1,16 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class SearchLinkResourceSchema(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
+ payload = fields.String(required=True)
15
+ is_active = fields.Boolean(allow_none=True)
16
+ updated_at = fields.DateTime()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.670
3
+ Version: 0.0.671
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -866,6 +866,9 @@ cs_models/resources/SalesProductsMap/schemas.py,sha256=zocpRe3by4_wUKwy-Cp2I190-
866
866
  cs_models/resources/ScratchpadTable/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
867
867
  cs_models/resources/ScratchpadTable/models.py,sha256=JGjzIMa-IaVDCk512G8nX3QgmfcvbQwCR91F6ykNA74,888
868
868
  cs_models/resources/ScratchpadTable/schemas.py,sha256=pQPf6xpsg0ZKDM9xwesvrpdq8HwpvXXzWpEPvxw8BBU,505
869
+ cs_models/resources/SearchLink/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
870
+ cs_models/resources/SearchLink/models.py,sha256=l1tPCSKHK7Wq1OUWFH72NYncEt6Q3bR0P6ii7YKoxCM,729
871
+ cs_models/resources/SearchLink/schemas.py,sha256=A8Y6LRgw7MHs9bihf0gZPfqp6KDm0Z8k6PJSL9WVxsc,448
869
872
  cs_models/resources/Stream/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
870
873
  cs_models/resources/Stream/models.py,sha256=wXb7yOjW82ZqmLhRcDhjLPk6_WJ5FGmvKpOcSvDMuBM,1884
871
874
  cs_models/resources/Stream/schemas.py,sha256=ZFsdEKINFGaSBUAcQQvilq5MKpYGliZseguQoc_opxk,3111
@@ -1105,7 +1108,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1105
1108
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1106
1109
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1107
1110
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1108
- cs_models-0.0.670.dist-info/METADATA,sha256=87qKTmDCLRn6WUZ-sQN0-QnSHr-SDrM7lbbeiBORWUU,792
1109
- cs_models-0.0.670.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1110
- cs_models-0.0.670.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1111
- cs_models-0.0.670.dist-info/RECORD,,
1111
+ cs_models-0.0.671.dist-info/METADATA,sha256=3FSrUla4-dMgZE8NR6FET_Xs-PTLnlUceNKWsytcK1o,792
1112
+ cs_models-0.0.671.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1113
+ cs_models-0.0.671.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1114
+ cs_models-0.0.671.dist-info/RECORD,,