cs-models 0.0.775__py3-none-any.whl → 0.0.776__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,32 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import (
4
+ Column,
5
+ Integer,
6
+ DateTime,
7
+ Text,
8
+ Float,
9
+ String,
10
+ Boolean,
11
+ )
12
+
13
+ from ...database import Base
14
+
15
+
16
+ class SalesTableModel(Base):
17
+ __tablename__ = "sales_tables"
18
+
19
+ id = Column(Integer, primary_key=True)
20
+ sec_accession_number = Column(String(128), nullable=False, index=True)
21
+ table_number = Column(Integer, nullable=False)
22
+ table_preceding_info = Column(Text, nullable=True)
23
+ table_html = Column(Text, nullable=True)
24
+ score = Column(Float, nullable=True)
25
+ processed = Column(Boolean, nullable=True)
26
+ updated_at = Column(
27
+ DateTime,
28
+ nullable=False,
29
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
30
+ default=lambda: datetime.utcnow(),
31
+ onupdate=lambda: datetime.utcnow(),
32
+ )
@@ -0,0 +1,18 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class SalesTableResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ sec_accession_number = fields.Integer(required=True)
13
+ table_number = fields.Integer(required=True)
14
+ table_html = fields.String(required=True)
15
+ table_preceding_info = fields.String(required=True)
16
+ score = fields.Float(allow_none=True)
17
+ processed = fields.Boolean(allow_none=True)
18
+ updated_at = fields.DateTime()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.775
3
+ Version: 0.0.776
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -926,6 +926,9 @@ cs_models/resources/SalesEstimateTarget/schemas.py,sha256=94kjvgpavcEkvJ9RABMo9w
926
926
  cs_models/resources/SalesProductsMap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
927
927
  cs_models/resources/SalesProductsMap/models.py,sha256=kObHYA2q2wNY8QTqZd0mP5nSdFGoqnXRwlzOSSjvdK8,858
928
928
  cs_models/resources/SalesProductsMap/schemas.py,sha256=zocpRe3by4_wUKwy-Cp2I190-scyG9wbgjZs37Je728,401
929
+ cs_models/resources/SalesTable/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
930
+ cs_models/resources/SalesTable/models.py,sha256=y5m2Nz4dKIdNB1Or5FGORTZwem7yizsK_oayLW3YWd4,869
931
+ cs_models/resources/SalesTable/schemas.py,sha256=K2eB4JThRY6wbO2S2zz1x4jKRzUXYaS3WQB51VAF-c4,552
929
932
  cs_models/resources/ScratchpadTable/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
930
933
  cs_models/resources/ScratchpadTable/models.py,sha256=JGjzIMa-IaVDCk512G8nX3QgmfcvbQwCR91F6ykNA74,888
931
934
  cs_models/resources/ScratchpadTable/schemas.py,sha256=pQPf6xpsg0ZKDM9xwesvrpdq8HwpvXXzWpEPvxw8BBU,505
@@ -1270,7 +1273,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1270
1273
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1271
1274
  cs_models/utils/utils.py,sha256=BzCDk3u1np7DoJQqCZIJN4f80JNHvJoWO4qEFgolN-8,4474
1272
1275
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1273
- cs_models-0.0.775.dist-info/METADATA,sha256=c4L4Wp-uBidVxMh07xFrtlDoAP4hZacBnDXaEJi5CMY,751
1274
- cs_models-0.0.775.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1275
- cs_models-0.0.775.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1276
- cs_models-0.0.775.dist-info/RECORD,,
1276
+ cs_models-0.0.776.dist-info/METADATA,sha256=FFZPKFVSoyDkCNXUFBKEgFCxnenKpazoHFyzMZRTo_A,751
1277
+ cs_models-0.0.776.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1278
+ cs_models-0.0.776.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1279
+ cs_models-0.0.776.dist-info/RECORD,,