cs-models 0.0.662__py3-none-any.whl → 0.0.663__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,35 @@
1
+ from datetime import datetime
2
+
3
+ from sqlalchemy import (
4
+ Column,
5
+ Integer,
6
+ DateTime,
7
+ ForeignKey,
8
+ Boolean,
9
+ )
10
+
11
+ from ...database import Base
12
+
13
+
14
+ class PubmedUserDocumentModel(Base):
15
+ __tablename__ = "pubmed_user_documents"
16
+
17
+ id = Column(Integer, primary_key=True)
18
+ pubmed_id = Column(
19
+ Integer,
20
+ ForeignKey('pubmed.id'),
21
+ nullable=False,
22
+ )
23
+ user_document_id = Column(
24
+ Integer,
25
+ ForeignKey('user_documents.id'),
26
+ nullable=False,
27
+ )
28
+ is_deleted = Column(Boolean, nullable=True)
29
+ updated_at = Column(
30
+ DateTime,
31
+ nullable=False,
32
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
33
+ default=lambda: datetime.utcnow(),
34
+ onupdate=lambda: datetime.utcnow(),
35
+ )
@@ -0,0 +1,15 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class PubmedUserDocumentResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ pubmed_id = fields.Integer(required=True)
13
+ user_document_id = fields.Integer(required=True)
14
+ is_deleted = fields.Boolean(allow_none=True)
15
+ updated_at = fields.DateTime()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cs-models
3
- Version: 0.0.662
3
+ Version: 0.0.663
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -835,6 +835,9 @@ cs_models/resources/PubmedTarget/schemas.py,sha256=fY6t6JwzSgc95WVPXJUKJz5kYNZoL
835
835
  cs_models/resources/PubmedUpdateLedger/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
836
836
  cs_models/resources/PubmedUpdateLedger/models.py,sha256=3roSR67RZbpxo5sQ-ZSfYItHInrJaT1lMbSKr95JjOw,744
837
837
  cs_models/resources/PubmedUpdateLedger/schemas.py,sha256=rlXKvQNfcBUjcsYZtxbd6xBrAQslNHD5lfaLKpL2rvw,445
838
+ cs_models/resources/PubmedUserDocument/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
839
+ cs_models/resources/PubmedUserDocument/models.py,sha256=h95HWZEblSFuEIIyYY2B8kVaM1DfzWhb-xKpya0CHoY,826
840
+ cs_models/resources/PubmedUserDocument/schemas.py,sha256=f7V1GmE7EB0jF-WqIUp6BbBYtNCIvAvE_cdk5wTWu8A,410
838
841
  cs_models/resources/PubmedVectorIndex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
839
842
  cs_models/resources/PubmedVectorIndex/models.py,sha256=PaCcSubMQijFEm7haiPT13-KMyz4fR0ConRUW1f1dzg,833
840
843
  cs_models/resources/PubmedVectorIndex/schemas.py,sha256=U1SFhceJoe2MypkoHp78-Gz__yg4B6F6wvCyMpmTfYk,470
@@ -1090,7 +1093,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1090
1093
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1091
1094
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1092
1095
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1093
- cs_models-0.0.662.dist-info/METADATA,sha256=zmxEt0JkBSNQts1pdKX1RXyxqxlVXr4PfuBc9N0V8vw,792
1094
- cs_models-0.0.662.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1095
- cs_models-0.0.662.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1096
- cs_models-0.0.662.dist-info/RECORD,,
1096
+ cs_models-0.0.663.dist-info/METADATA,sha256=ZQKD3BWWlaCbGWp30QyGp6nQA4QNcBiVs-jnotEOWEQ,792
1097
+ cs_models-0.0.663.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
1098
+ cs_models-0.0.663.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1099
+ cs_models-0.0.663.dist-info/RECORD,,