guarantee-admin-api-v0.2/Modules/Rating/RatingObjects.py

33 lines
1.2 KiB
Python

from Utils.ObjUtil import SpecObject
from Utils.ValidateUtil import ValidateAttr, Validate
class RatingRecord(SpecObject):
"""评级记录"""
rid = ValidateAttr(field="rid", type=str)
report_date = ValidateAttr(field="report_date", func=Validate.date_format)
status = ValidateAttr(field="status", in_list=["完成", "进行"])
cid = ValidateAttr(field="cid", type=str)
company_name = ValidateAttr(field="company_name", type=str)
rank_time = ValidateAttr(field="rank_time", func=Validate.date_format)
credit_level = ValidateAttr(field="credit_level", type=str)
credit_score = ValidateAttr(field="credit_score", type=float)
rating_report = ValidateAttr(field="rating_report", type=str)
province = ValidateAttr(field="province", type=str)
city = ValidateAttr(field="city", type=str)
fields_map = {
"rid": "评级ID",
"report_date": "报告期",
"status": "评级状态",
"cid": "企业ID",
"company_name": "企业名称",
"rank_time": "评级时间",
"credit_level": "信用级别",
"credit_score": "信用得分",
"rating_report": "评级报告",
"province": "所在省份",
"city": "所在城市",
}