cs-models 0.0.706__py3-none-any.whl → 0.0.708__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,38 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import (
4
+ Column,
5
+ Integer,
6
+ DateTime,
7
+ String,
8
+ Text,
9
+ Boolean,
10
+ ForeignKey,
11
+ )
12
+
13
+ from ...database import Base
14
+
15
+
16
+ class FigureModel(Base):
17
+ __tablename__ = "figures"
18
+
19
+ id = Column(Integer, primary_key=True)
20
+ file_id = Column(
21
+ Integer,
22
+ ForeignKey('files.id'),
23
+ nullable=True,
24
+ )
25
+ source_type = Column(String(50), nullable=False)
26
+ source_id = Column(Integer, nullable=False)
27
+ figure_label = Column(String(50), nullable=True)
28
+ figure_caption = Column(Text, nullable=True)
29
+ figure_description = Column(Text, nullable=True)
30
+ figure_link = Column(String(255), nullable=True)
31
+ llm_processed = Column(Boolean, nullable=True)
32
+ updated_at = Column(
33
+ DateTime,
34
+ nullable=False,
35
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
36
+ default=lambda: datetime.utcnow(),
37
+ onupdate=lambda: datetime.utcnow(),
38
+ )
@@ -0,0 +1,20 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class FigureResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ file_id = fields.Integer(required=True)
13
+ source_type = fields.String(required=True)
14
+ source_id = fields.Integer(required=True)
15
+ figure_label = fields.String(allow_none=True)
16
+ figure_caption = fields.String(allow_none=True)
17
+ figure_description = fields.String(allow_none=True)
18
+ figure_link = fields.String(allow_none=True)
19
+ llm_processed = fields.Boolean(allow_none=True)
20
+ updated_at = fields.DateTime()
@@ -16,6 +16,7 @@ class UserDocumentHierarchyModel(Base):
16
16
  __tablename__ = 'user_documents_hierarchy'
17
17
 
18
18
  id = Column(Integer, primary_key=True)
19
+ provider_id = Column(String(128), nullable=False, index=True)
19
20
  user_id = Column(String(128), nullable=False, index=True)
20
21
  type = Column(String(50), nullable=False)
21
22
  document_name = Column(String(255), nullable=True)
@@ -9,6 +9,7 @@ class UserDocumentHierarchyResourceSchema(Schema):
9
9
  not_blank = validate.Length(min=1, error='Field cannot be blank')
10
10
 
11
11
  id = fields.Integer(dump_only=True)
12
+ provider_id = fields.String(required=True)
12
13
  user_id = fields.String(required=True)
13
14
  type = fields.String(required=True)
14
15
  document_name = fields.String(allow_none=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.706
3
+ Version: 0.0.708
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -341,6 +341,9 @@ cs_models/resources/FederalCaseRef/__init__.py,sha256=0I8MBmiT-2pNtJYM8XF-xVjlOG
341
341
  cs_models/resources/FederalCaseRef/models.py,sha256=SiaWm1dmdTA407y8vVzf2gkU6IHbvuU6ZnmBjt_hBug,771
342
342
  cs_models/resources/FederalCaseRef/schemas.py,sha256=CjDlOyiRC_hT2ScdR9J_ln9TSVag_--ba9WEhGj3pXI,590
343
343
  cs_models/resources/FederalCaseRef/test_federal_case_ref.py,sha256=XfeyHzwn0gGAB1QfDoRM1CFgCGfggJCWvt5A_xqn4qM,4115
344
+ cs_models/resources/Figure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
345
+ cs_models/resources/Figure/models.py,sha256=CSjZQFrRn5jpAsrX4rrf-GWN6t3aR8ouI9yk7QRun64,1011
346
+ cs_models/resources/Figure/schemas.py,sha256=S4KcUNmHwcuWLONWhiy8KrPDOgaNSCHRmHoniq2fRao,646
344
347
  cs_models/resources/File/__init__.py,sha256=eODbmnbxhnyka2FlPZbF_KmHGVpSakqgHYw8sPqb_hs,5815
345
348
  cs_models/resources/File/models.py,sha256=PMG9wkcIQHofZmAPJHx5LUNNFkXfy922sHWXRtIH6Ec,897
346
349
  cs_models/resources/File/schemas.py,sha256=RyOtOd21lC00tN_SAuKiTSEbye4ukAD_Jq_3KGA2Xlk,1166
@@ -978,8 +981,8 @@ cs_models/resources/UserDocumentCondition/__init__.py,sha256=47DEQpj8HBSa-_TImW-
978
981
  cs_models/resources/UserDocumentCondition/models.py,sha256=FZzNgxc4-zZ5TiuJYfxNjPvi5mZCunTc9sVOXBGYpqc,1007
979
982
  cs_models/resources/UserDocumentCondition/schemas.py,sha256=BeeRrfrLW9N3k0IsOhoi3CXXos4rNbJ_ka4Qqbj-Ddw,550
980
983
  cs_models/resources/UserDocumentHierarchy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
981
- cs_models/resources/UserDocumentHierarchy/models.py,sha256=vNo15EfKsfO136Fc0hqXB6sjazJ8ksqTuOUHTVCSEHE,1359
982
- cs_models/resources/UserDocumentHierarchy/schemas.py,sha256=4nAwk-qLhMKQqc5-netIIJeHDztBDORz9iTdyqRKe7o,712
984
+ cs_models/resources/UserDocumentHierarchy/models.py,sha256=qz-vxxGo5hOrDBxJ8c9nLJmbObJbovnZprkuHzgMl-c,1425
985
+ cs_models/resources/UserDocumentHierarchy/schemas.py,sha256=2AqeGjErCd_mZxAPClphJa4jI4ELmLo0lfgPg-G6H8k,759
983
986
  cs_models/resources/UserDocumentIntervention/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
984
987
  cs_models/resources/UserDocumentIntervention/models.py,sha256=XDW1UIMnsQoyszHeel_aaCGnd_XfWxIOJF-JJBn9IoM,1019
985
988
  cs_models/resources/UserDocumentIntervention/schemas.py,sha256=XKgWDYGiU7NTPqNHkqxWgbdz0wMwt8__SlxrCPhEqrU,556
@@ -1171,7 +1174,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1171
1174
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1172
1175
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1173
1176
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1174
- cs_models-0.0.706.dist-info/METADATA,sha256=Y7K7LbJnUge1ORlvUeTr-msB_1VsTitsr-cJejtY6W0,792
1175
- cs_models-0.0.706.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1176
- cs_models-0.0.706.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1177
- cs_models-0.0.706.dist-info/RECORD,,
1177
+ cs_models-0.0.708.dist-info/METADATA,sha256=BFwhleVKYXcBAhmPqRwpmaBgzN1R2tKgfwUgRFKUWHY,792
1178
+ cs_models-0.0.708.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1179
+ cs_models-0.0.708.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1180
+ cs_models-0.0.708.dist-info/RECORD,,