cs-models 0.0.607__py3-none-any.whl → 0.0.609__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.
- cs_models/resources/InterventionInterventionSalesData/__init__.py +0 -0
- cs_models/resources/InterventionInterventionSalesData/models.py +40 -0
- cs_models/resources/InterventionInterventionSalesData/schemas.py +16 -0
- cs_models/resources/InterventionSalesData/models.py +5 -0
- cs_models/resources/InterventionSalesData/schemas.py +4 -0
- {cs_models-0.0.607.dist-info → cs_models-0.0.609.dist-info}/METADATA +1 -1
- {cs_models-0.0.607.dist-info → cs_models-0.0.609.dist-info}/RECORD +9 -6
- {cs_models-0.0.607.dist-info → cs_models-0.0.609.dist-info}/WHEEL +0 -0
- {cs_models-0.0.607.dist-info → cs_models-0.0.609.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import (
|
|
4
|
+
Column,
|
|
5
|
+
Integer,
|
|
6
|
+
DateTime,
|
|
7
|
+
ForeignKey,
|
|
8
|
+
Boolean,
|
|
9
|
+
Float,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from ...database import Base
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class InterventionInterventionSalesDataModel(Base):
|
|
16
|
+
__tablename__ = "intervention_intervention_sales_data"
|
|
17
|
+
|
|
18
|
+
id = Column(Integer, primary_key=True)
|
|
19
|
+
intervention_id = Column(
|
|
20
|
+
Integer,
|
|
21
|
+
ForeignKey('interventions.id'),
|
|
22
|
+
nullable=False,
|
|
23
|
+
)
|
|
24
|
+
intervention_sales_data_id = Column(
|
|
25
|
+
Integer,
|
|
26
|
+
ForeignKey('intervention_sales_data.id'),
|
|
27
|
+
nullable=False,
|
|
28
|
+
)
|
|
29
|
+
score = Column(
|
|
30
|
+
Float,
|
|
31
|
+
nullable=False,
|
|
32
|
+
)
|
|
33
|
+
is_deleted = Column(Boolean, nullable=True)
|
|
34
|
+
updated_at = Column(
|
|
35
|
+
DateTime,
|
|
36
|
+
nullable=False,
|
|
37
|
+
# https://stackoverflow.com/questions/58776476/why-doesnt-freezegun-work-with-sqlalchemy-default-values
|
|
38
|
+
default=lambda: datetime.utcnow(),
|
|
39
|
+
onupdate=lambda: datetime.utcnow(),
|
|
40
|
+
)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
validate,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class InterventionInterventionSalesDataResourceSchema(Schema):
|
|
9
|
+
not_blank = validate.Length(min=1, error='Field cannot be blank')
|
|
10
|
+
|
|
11
|
+
id = fields.Integer(dump_only=True)
|
|
12
|
+
intervention_id = fields.Integer(required=True)
|
|
13
|
+
intervention_sales_data_id = fields.Integer(required=True)
|
|
14
|
+
score = fields.Float(required=True)
|
|
15
|
+
is_deleted = fields.Boolean(allow_none=True)
|
|
16
|
+
updated_at = fields.DateTime()
|
|
@@ -36,6 +36,11 @@ class InterventionSalesDataModel(Base):
|
|
|
36
36
|
ForeignKey('companies_sec_filings.id'),
|
|
37
37
|
nullable=True,
|
|
38
38
|
)
|
|
39
|
+
sales_id = Column(
|
|
40
|
+
Integer,
|
|
41
|
+
ForeignKey('sales.id'),
|
|
42
|
+
nullable=True,
|
|
43
|
+
)
|
|
39
44
|
info = Column(Text, nullable=True)
|
|
40
45
|
updated_at = Column(
|
|
41
46
|
DateTime,
|
|
@@ -16,6 +16,7 @@ class InterventionSalesDataResourceSchema(Schema):
|
|
|
16
16
|
news_id = fields.Integer(allow_none=True)
|
|
17
17
|
company_filing_id = fields.Integer(allow_none=True)
|
|
18
18
|
sec_filing_id = fields.Integer(allow_none=True)
|
|
19
|
+
sales_id = fields.Integer(allow_none=True)
|
|
19
20
|
info = fields.String(allow_none=True)
|
|
20
21
|
updated_at = fields.DateTime()
|
|
21
22
|
|
|
@@ -36,4 +37,7 @@ class InterventionSalesDataResourceSchema(Schema):
|
|
|
36
37
|
if 'sec_filing_id' in in_data:
|
|
37
38
|
if in_data['sec_filing_id'] is not None:
|
|
38
39
|
result += 1
|
|
40
|
+
if 'sales_id' in in_data:
|
|
41
|
+
if in_data['sales_id'] is not None:
|
|
42
|
+
result += 1
|
|
39
43
|
return result
|
|
@@ -385,6 +385,9 @@ cs_models/resources/InterventionDesc/schemas.py,sha256=O5oktBmkrah54lFh4a6l0dTTc
|
|
|
385
385
|
cs_models/resources/InterventionFiles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
386
386
|
cs_models/resources/InterventionFiles/models.py,sha256=_taStFnqCrmD2t1HkxjuRQ87uym6t2imRd9Pd0AfxTk,1024
|
|
387
387
|
cs_models/resources/InterventionFiles/schemas.py,sha256=cGg6eduhQc0_W2iHcOTtck7HDna63T8TmOGdfJ19Grk,496
|
|
388
|
+
cs_models/resources/InterventionInterventionSalesData/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
389
|
+
cs_models/resources/InterventionInterventionSalesData/models.py,sha256=xJVwvxar0-cn3iqW7Q5YcZ-9kFjH0SmfvkMvStASyV4,964
|
|
390
|
+
cs_models/resources/InterventionInterventionSalesData/schemas.py,sha256=TI8tu0GdtiVjUlf_4WBytVaPmSBVX75f67im7OMbkUQ,481
|
|
388
391
|
cs_models/resources/InterventionMilestone/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
389
392
|
cs_models/resources/InterventionMilestone/models.py,sha256=LhPGrINpLjmxiuxnVgfT3QXOY0esGd6bfBRvbMBTtDo,1239
|
|
390
393
|
cs_models/resources/InterventionMilestone/schemas.py,sha256=f-37enqMKIwQ_BLVnc93dLJGzZpR_4cOz-gftvJAzCw,1321
|
|
@@ -419,8 +422,8 @@ cs_models/resources/InterventionSales/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCe
|
|
|
419
422
|
cs_models/resources/InterventionSales/models.py,sha256=MYp1xAfo_m7I4DAjAguCBJmJo7ocHh1QKjnRY9p-iAA,1001
|
|
420
423
|
cs_models/resources/InterventionSales/schemas.py,sha256=rTI_FdmcxpHhSSXVYQ9PmeNRhLFz7YEBemeEojtMeqs,453
|
|
421
424
|
cs_models/resources/InterventionSalesData/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
422
|
-
cs_models/resources/InterventionSalesData/models.py,sha256
|
|
423
|
-
cs_models/resources/InterventionSalesData/schemas.py,sha256=
|
|
425
|
+
cs_models/resources/InterventionSalesData/models.py,sha256=-hd-l2CRal6AZNkjHE2NmSJ7yZF1LyoSw8WMPlQjv6w,1173
|
|
426
|
+
cs_models/resources/InterventionSalesData/schemas.py,sha256=Ptm64nY8bTTC5hHnIa3uFQXKH9uI5VCrwogae6TpAq4,1410
|
|
424
427
|
cs_models/resources/InterventionSubsidiary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
425
428
|
cs_models/resources/InterventionSubsidiary/models.py,sha256=iEs-9KKrbEMbtqQtLvogKx9XUdYFFZGQ-if0duVlQAk,942
|
|
426
429
|
cs_models/resources/InterventionSubsidiary/schemas.py,sha256=B_mUbjaVpeOE3Bj8mVOIw3FlfT8lDHZy995nGVE_600,417
|
|
@@ -994,7 +997,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
994
997
|
cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
|
|
995
998
|
cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
|
|
996
999
|
cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
|
|
997
|
-
cs_models-0.0.
|
|
998
|
-
cs_models-0.0.
|
|
999
|
-
cs_models-0.0.
|
|
1000
|
-
cs_models-0.0.
|
|
1000
|
+
cs_models-0.0.609.dist-info/METADATA,sha256=2SsUh8ukwoRtz7ncVlRG8yL6Dh07lg32gUHChHiz480,791
|
|
1001
|
+
cs_models-0.0.609.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
1002
|
+
cs_models-0.0.609.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
|
|
1003
|
+
cs_models-0.0.609.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|