2022-08-31 11:21:58 +08:00
|
|
|
from Utils.ObjUtil import SpecObject
|
|
|
|
from Utils.ValidateUtil import ValidateAttr, Validate
|
|
|
|
|
|
|
|
|
|
|
|
class InvestmentList(SpecObject):
|
|
|
|
"""投资列表"""
|
|
|
|
cid = ValidateAttr(field="cid", type=str, default=None)
|
|
|
|
cname = ValidateAttr(field="cname", type=str)
|
|
|
|
representative = ValidateAttr(field="representative", type=str)
|
|
|
|
establishment_date = ValidateAttr(field="establishment_date", func=Validate.date_format)
|
|
|
|
status = ValidateAttr(field="status", type=str)
|
|
|
|
investment_amount = ValidateAttr(field="investment_amount", type=[float, int, str])
|
2022-09-09 13:42:02 +08:00
|
|
|
investment_percentage = ValidateAttr(field="investment_percentage", type=[float, int, str], default=None)
|
|
|
|
holdings = ValidateAttr(field="holdings", type=[float, int, str], default=None)
|
2022-08-31 11:21:58 +08:00
|
|
|
industry = ValidateAttr(field="industry", type=str)
|
|
|
|
province = ValidateAttr(field="province", type=str)
|
|
|
|
city = ValidateAttr(field="city", type=str, default=None)
|
|
|
|
|
|
|
|
fields_map = {
|
|
|
|
"cid": "企业ID",
|
|
|
|
"cname": "企业名称",
|
|
|
|
"representative": "法定代表人",
|
|
|
|
"establishment_date": "成立日期",
|
|
|
|
"status": "企业状态",
|
|
|
|
"investment_amount": "投资金额",
|
|
|
|
"investment_percentage": "投资比例",
|
|
|
|
"holdings": "控股情况",
|
|
|
|
"industry": "所属行业",
|
|
|
|
"province": "所属省份",
|
|
|
|
"city": "所属地市",
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-09-09 13:42:02 +08:00
|
|
|
class InvestmentObj(SpecObject):
|
|
|
|
"""对外投资"""
|
2022-08-31 11:21:58 +08:00
|
|
|
cid = ValidateAttr(field='cid', type=str, length=8)
|
2022-09-09 13:42:02 +08:00
|
|
|
cname = ValidateAttr(field='cname', type=str)
|
2022-08-31 11:21:58 +08:00
|
|
|
investment_list = ValidateAttr(field='investment_list', instance_list=InvestmentList)
|
|
|
|
update_time = ValidateAttr(field='update_time', func=Validate.time_format)
|
|
|
|
|
|
|
|
fields_map = {
|
|
|
|
"cid": "企业ID",
|
2022-09-09 13:42:02 +08:00
|
|
|
"cname": "企业名称",
|
2022-08-31 11:21:58 +08:00
|
|
|
"investment_list": "投资列表",
|
|
|
|
"update_time": "更新时间"
|
|
|
|
}
|