cs-models 0.0.753__py3-none-any.whl → 0.0.754__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.

@@ -3,9 +3,6 @@ from sqlalchemy import (
3
3
  Integer,
4
4
  String,
5
5
  DateTime,
6
- ForeignKey,
7
- Boolean,
8
- Float,
9
6
  )
10
7
  from datetime import datetime
11
8
 
@@ -16,19 +13,12 @@ class FDADrugReviewModel(Base):
16
13
  __tablename__ = 'fda_drug_reviews'
17
14
 
18
15
  id = Column(Integer, primary_key=True)
19
- file_id = Column(
20
- Integer,
21
- ForeignKey('files.id'),
22
- nullable=False,
23
- )
24
- date = Column(DateTime, nullable=True)
25
- title = Column(String(255), nullable=True)
26
- page_count = Column(Integer, nullable=True)
27
- type = Column(String(255), nullable=True)
28
- orig_file_url = Column(String(255), nullable=True)
29
- is_deleted = Column(Boolean, nullable=True)
30
- unprocessed = Column(Boolean, nullable=True)
31
- reviewed = Column(Boolean, nullable=True)
16
+ application_docs_id = Column(String(128), nullable=False)
17
+ appl_no = Column(String(50), nullable=False)
18
+ submission_type = Column(String(50), nullable=True)
19
+ submission_no = Column(String(50), nullable=True)
20
+ application_doc_url = Column(String(255), nullable=True)
21
+ application_doc_date = Column(DateTime, nullable=True)
32
22
  updated_at = Column(
33
23
  DateTime,
34
24
  nullable=False,
@@ -9,13 +9,10 @@ class FDADrugReviewResourceSchema(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
- file_id = fields.Integer(required=True)
13
- date = fields.DateTime(allow_none=True)
14
- title = fields.String(allow_none=True)
15
- page_count = fields.Integer(allow_none=True)
16
- type = fields.String(allow_none=True)
17
- orig_file_url = fields.String(allow_none=True)
18
- is_deleted = fields.Boolean(allow_none=True)
19
- unprocessed = fields.Boolean(allow_none=True)
20
- reviewed = fields.Boolean(allow_none=True)
12
+ application_docs_id = fields.String(required=True)
13
+ appl_no = fields.String(required=True)
14
+ submission_type = fields.String(allow_none=True)
15
+ submission_no = fields.String(allow_none=True)
16
+ application_doc_url = fields.String(allow_none=True)
17
+ application_doc_date = fields.DateTime(allow_none=True)
21
18
  updated_at = fields.DateTime(dump_only=True)
File without changes
@@ -0,0 +1,43 @@
1
+ from sqlalchemy import (
2
+ Column,
3
+ Integer,
4
+ String,
5
+ DateTime,
6
+ ForeignKey,
7
+ Boolean,
8
+ Float,
9
+ )
10
+ from datetime import datetime
11
+
12
+ from ...database import Base
13
+
14
+
15
+ class FDADrugReviewFileModel(Base):
16
+ __tablename__ = 'fda_drug_reviews_files'
17
+
18
+ id = Column(Integer, primary_key=True)
19
+ fda_drug_review_id = Column(
20
+ Integer,
21
+ ForeignKey('fda_drug_reviews.id'),
22
+ nullable=False,
23
+ )
24
+ file_id = Column(
25
+ Integer,
26
+ ForeignKey('files.id'),
27
+ nullable=False,
28
+ )
29
+ date = Column(DateTime, nullable=True)
30
+ title = Column(String(255), nullable=True)
31
+ page_count = Column(Integer, nullable=True)
32
+ type = Column(String(255), nullable=True)
33
+ orig_file_url = Column(String(255), nullable=True)
34
+ is_deleted = Column(Boolean, nullable=True)
35
+ unprocessed = Column(Boolean, nullable=True)
36
+ reviewed = Column(Boolean, nullable=True)
37
+ updated_at = Column(
38
+ DateTime,
39
+ nullable=False,
40
+ # https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
41
+ default=lambda: datetime.utcnow(),
42
+ onupdate=lambda: datetime.utcnow(),
43
+ )
@@ -0,0 +1,22 @@
1
+ from marshmallow import (
2
+ Schema,
3
+ fields,
4
+ validate,
5
+ )
6
+
7
+
8
+ class FDADrugReviewFileResourceSchema(Schema):
9
+ not_blank = validate.Length(min=1, error='Field cannot be blank')
10
+
11
+ id = fields.Integer(dump_only=True)
12
+ fda_drug_review_id = fields.Integer(required=True)
13
+ file_id = fields.Integer(required=True)
14
+ date = fields.DateTime(allow_none=True)
15
+ title = fields.String(allow_none=True)
16
+ page_count = fields.Integer(allow_none=True)
17
+ type = fields.String(allow_none=True)
18
+ orig_file_url = fields.String(allow_none=True)
19
+ is_deleted = fields.Boolean(allow_none=True)
20
+ unprocessed = fields.Boolean(allow_none=True)
21
+ reviewed = fields.Boolean(allow_none=True)
22
+ 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.753
3
+ Version: 0.0.754
4
4
  Summary: MySQL db models
5
5
  Home-page: https://github.com/mindgram/cs-models
6
6
  Author: Shrey Verma
@@ -317,8 +317,11 @@ cs_models/resources/ExplorerColumn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
317
317
  cs_models/resources/ExplorerColumn/models.py,sha256=t448jSUDUNpN3MPlA1-nf2H-K9KVfMkKIV7ruB-DSks,799
318
318
  cs_models/resources/ExplorerColumn/schemas.py,sha256=0qsNjOCkilZNa_Ly083dzp43h72MrAFM39dp2s8CnmY,442
319
319
  cs_models/resources/FDADrugReview/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
320
- cs_models/resources/FDADrugReview/models.py,sha256=zs3nLJgd9aoO2I8H03pyqEmu5LVB3lWpLfLuj30G9z4,1050
321
- cs_models/resources/FDADrugReview/schemas.py,sha256=--onPQRRaxDKZgrh42KADLpyjCf5gc06BE1VbUOKnZw,690
320
+ cs_models/resources/FDADrugReview/models.py,sha256=Z1tXPTamqCDQbV5ZOItX26XP0UeQGXlgAqOsK0wuy3w,868
321
+ cs_models/resources/FDADrugReview/schemas.py,sha256=5jh7p0XhbI-yqCJ4t-4DdQ21R7vRmdEpvAo6IhRyLsU,590
322
+ cs_models/resources/FDADrugReviewFile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
323
+ cs_models/resources/FDADrugReviewFile/models.py,sha256=ZLFnNx58Uv4YVs42jX8kHlBvjj87FcCrhCOb_7Wa9cw,1183
324
+ cs_models/resources/FDADrugReviewFile/schemas.py,sha256=q2IxAoRjcPa70eKV-MvLbdZsHBOsLR_YWogDMC-3KjY,749
322
325
  cs_models/resources/FDALabel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
323
326
  cs_models/resources/FDALabel/models.py,sha256=9J7Erh0fr6OrpQNBgyx83qdWxAuKg9NUbMLzG3EBWvI,1234
324
327
  cs_models/resources/FDALabel/schemas.py,sha256=J6_J2PkZInLxay5Bvq6TuHuJdii4TRoLhIE4RBT8FeY,793
@@ -1231,7 +1234,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1231
1234
  cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
1232
1235
  cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
1233
1236
  cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
1234
- cs_models-0.0.753.dist-info/METADATA,sha256=I21ZsKITt5nyUXtE4rTloove8Mrl3X8jhOu8uOrAUjI,751
1235
- cs_models-0.0.753.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1236
- cs_models-0.0.753.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1237
- cs_models-0.0.753.dist-info/RECORD,,
1237
+ cs_models-0.0.754.dist-info/METADATA,sha256=78wFOQEsa8b9cSt4GkTNvVfJ7iwacOQka3ziH3xnnww,751
1238
+ cs_models-0.0.754.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1239
+ cs_models-0.0.754.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
1240
+ cs_models-0.0.754.dist-info/RECORD,,