cs-models 0.0.730__py3-none-any.whl → 0.0.732__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/DealInvestor/models.py +1 -0
- cs_models/resources/DealInvestor/schemas.py +1 -0
- cs_models/resources/VACompanyMap/__init__.py +0 -0
- cs_models/resources/VACompanyMap/models.py +34 -0
- cs_models/resources/VACompanyMap/schemas.py +35 -0
- {cs_models-0.0.730.dist-info → cs_models-0.0.732.dist-info}/METADATA +1 -1
- {cs_models-0.0.730.dist-info → cs_models-0.0.732.dist-info}/RECORD +9 -6
- {cs_models-0.0.730.dist-info → cs_models-0.0.732.dist-info}/WHEEL +0 -0
- {cs_models-0.0.730.dist-info → cs_models-0.0.732.dist-info}/top_level.txt +0 -0
|
@@ -11,5 +11,6 @@ class DealInvestorResourceSchema(Schema):
|
|
|
11
11
|
id = fields.Integer(dump_only=True)
|
|
12
12
|
deal_id = fields.Integer(required=True)
|
|
13
13
|
investor_id = fields.Integer(required=True)
|
|
14
|
+
lead = fields.Boolean(allow_none=True)
|
|
14
15
|
is_deleted = fields.Boolean(allow_none=True)
|
|
15
16
|
updated_at = fields.DateTime()
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from sqlalchemy import (
|
|
2
|
+
Column,
|
|
3
|
+
Integer,
|
|
4
|
+
String,
|
|
5
|
+
DateTime,
|
|
6
|
+
ForeignKey,
|
|
7
|
+
)
|
|
8
|
+
from datetime import datetime
|
|
9
|
+
|
|
10
|
+
from ...database import Base
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class VACompanyMapModel(Base):
|
|
14
|
+
__tablename__ = 'va_company_map'
|
|
15
|
+
|
|
16
|
+
id = Column(Integer, primary_key=True)
|
|
17
|
+
cid = Column(Integer, nullable=False, index=True)
|
|
18
|
+
cik = Column(String(191), nullable=False, index=True)
|
|
19
|
+
company_sec_id = Column(
|
|
20
|
+
Integer,
|
|
21
|
+
ForeignKey('companies_sec.id'),
|
|
22
|
+
nullable=True,
|
|
23
|
+
)
|
|
24
|
+
company_ous_id = Column(
|
|
25
|
+
Integer,
|
|
26
|
+
ForeignKey('companies_ous.id'),
|
|
27
|
+
nullable=True,
|
|
28
|
+
)
|
|
29
|
+
updated_at = Column(
|
|
30
|
+
DateTime,
|
|
31
|
+
nullable=False,
|
|
32
|
+
default=datetime.utcnow,
|
|
33
|
+
onupdate=datetime.utcnow,
|
|
34
|
+
)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from marshmallow import (
|
|
2
|
+
Schema,
|
|
3
|
+
fields,
|
|
4
|
+
validate,
|
|
5
|
+
pre_load,
|
|
6
|
+
ValidationError,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class VACompanyMapResourceSchema(Schema):
|
|
11
|
+
not_blank = validate.Length(min=1, error='Field cannot be blank')
|
|
12
|
+
|
|
13
|
+
id = fields.Integer(dump_only=True)
|
|
14
|
+
cid = fields.Integer(required=True)
|
|
15
|
+
cik = fields.String(allow_none=True)
|
|
16
|
+
company_sec_id = fields.Integer(allow_none=True)
|
|
17
|
+
company_ous_id = fields.Integer(allow_none=True)
|
|
18
|
+
updated_at = fields.DateTime(dump_only=True)
|
|
19
|
+
|
|
20
|
+
@pre_load
|
|
21
|
+
def check_company_ids(self, in_data, **kwargs):
|
|
22
|
+
if self._get_number_of_company_fields(in_data) > 1:
|
|
23
|
+
raise ValidationError('Provide either company_sec_id or '
|
|
24
|
+
'company_ous_id, not both')
|
|
25
|
+
return in_data
|
|
26
|
+
|
|
27
|
+
def _get_number_of_company_fields(self, in_data, **kwargs):
|
|
28
|
+
result = 0
|
|
29
|
+
if 'company_sec_id' in in_data:
|
|
30
|
+
if in_data['company_sec_id'] is not None:
|
|
31
|
+
result += 1
|
|
32
|
+
if 'company_ous_id' in in_data:
|
|
33
|
+
if in_data['company_ous_id'] is not None:
|
|
34
|
+
result += 1
|
|
35
|
+
return result
|
|
@@ -243,8 +243,8 @@ cs_models/resources/DealCondition/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
|
|
|
243
243
|
cs_models/resources/DealCondition/models.py,sha256=-q6W-YKst8eFQsuB8E3s98_VIQWjSIqJFVEdtW_G28M,804
|
|
244
244
|
cs_models/resources/DealCondition/schemas.py,sha256=m8ag-gkWjD6mX3Gbqp2yPQ21gxnEW3eFIUGzywuyFbA,399
|
|
245
245
|
cs_models/resources/DealInvestor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
246
|
-
cs_models/resources/DealInvestor/models.py,sha256=
|
|
247
|
-
cs_models/resources/DealInvestor/schemas.py,sha256=
|
|
246
|
+
cs_models/resources/DealInvestor/models.py,sha256=9nq0uvnYWG0LQN1Cfm5bJNY6AhtI4d2GdessRAnIQMg,842
|
|
247
|
+
cs_models/resources/DealInvestor/schemas.py,sha256=QAl7cM_lGSxjJK4Zyof8yLfXqIUfuXmFjg8p9TWuKAc,440
|
|
248
248
|
cs_models/resources/DealOutbox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
249
249
|
cs_models/resources/DealOutbox/models.py,sha256=jf1Vh5NGKO94X-0GVDrsWCjTeYg6Wu9HCDuIH-IECyA,1297
|
|
250
250
|
cs_models/resources/DealOutbox/schemas.py,sha256=-5EPiWngMfq_igX2u6-Zn8XRhq4PI-4zAPAKAIN_Vdw,1118
|
|
@@ -1041,6 +1041,9 @@ cs_models/resources/UserWatchlistAccess/schemas.py,sha256=YLC99AAtHJBltD_1vuzIPY
|
|
|
1041
1041
|
cs_models/resources/UserWorkbook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1042
1042
|
cs_models/resources/UserWorkbook/models.py,sha256=1f5V5o4AcHElMY31bME4S1wm06bm3SbLucYJrzk0ONk,759
|
|
1043
1043
|
cs_models/resources/UserWorkbook/schemas.py,sha256=0roXytt6Rv8RS6Um9WPZbWz2eYptmxacc7SEp0c2vHQ,427
|
|
1044
|
+
cs_models/resources/VACompanyMap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1045
|
+
cs_models/resources/VACompanyMap/models.py,sha256=5CQ-tXrG7OKPBIaBUICykTeeRzXJFP4Pg9TVRK8uzqs,750
|
|
1046
|
+
cs_models/resources/VACompanyMap/schemas.py,sha256=d1UPxtu6L-scc7HucwOf_6JcQ7G1-8NlfTu8eHzZMd4,1124
|
|
1044
1047
|
cs_models/resources/VAParameter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1045
1048
|
cs_models/resources/VAParameter/models.py,sha256=R2A4jsBKuev6VLcxniTcwc0urEs3b-Lx-XGTreXDoyM,956
|
|
1046
1049
|
cs_models/resources/VAParameter/schemas.py,sha256=NNEzDQbS7pwL5KjL_kXKCO3lqExu6nMERyPe_gltkys,776
|
|
@@ -1198,7 +1201,7 @@ cs_models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
1198
1201
|
cs_models/utils/alchemy.py,sha256=fhINGFn41owJ2DLXQKXAAtLqeZ1BRzD_qU0wPK_bsGQ,1598
|
|
1199
1202
|
cs_models/utils/utils.py,sha256=bY623DuzycfPQiaOQT2AxfANeWfwr5w76dBuQ813-ns,3664
|
|
1200
1203
|
cs_models/utils/profiling/__init__.py,sha256=N-73vb0M92C975fxgXyBCBjCPELl8Oh21ZY_-tzDnns,569
|
|
1201
|
-
cs_models-0.0.
|
|
1202
|
-
cs_models-0.0.
|
|
1203
|
-
cs_models-0.0.
|
|
1204
|
-
cs_models-0.0.
|
|
1204
|
+
cs_models-0.0.732.dist-info/METADATA,sha256=H7W92sLIkSqxI-j0OqFAqqbjiyVUA7iefIsgpW7h4uc,792
|
|
1205
|
+
cs_models-0.0.732.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
1206
|
+
cs_models-0.0.732.dist-info/top_level.txt,sha256=M7CA8Nh5t0vRManQ9gHfphhO16uhMqIbfaxr1jPDg18,10
|
|
1207
|
+
cs_models-0.0.732.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|