api-datamanager/Company/Basic/Executives/ExecutivesObj.py

30 lines
917 B
Python
Raw Normal View History

2022-08-31 10:12:16 +08:00
from Utils.ObjUtil import SpecObject
from Utils.ValidateUtil import ValidateAttr, Validate
class ExecutiveList(SpecObject):
"""高管列表"""
pid = ValidateAttr(field='pid', type=str, default=None)
name = ValidateAttr(field='name', type=str)
duties = ValidateAttr(field='duties', type=[list, str])
fields_map = {
"pid": "人物ID",
"name": "姓名",
"duties": "职务"
}
2022-09-09 13:42:02 +08:00
class ExecutiveObj(SpecObject):
"""高管信息"""
2022-08-31 10:12:16 +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 10:12:16 +08:00
executive_list = ValidateAttr(field='executive_list', instance_list=ExecutiveList)
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 10:12:16 +08:00
"executive_list": "高管列表",
"update_time": "更新时间"
}