23 lines
831 B
Python
23 lines
831 B
Python
from Utils.ObjUtil import SpecObject
|
|
from Utils.ValidateUtil import ValidateAttr, Validate
|
|
|
|
|
|
class TobUser(SpecObject):
|
|
"""企业用户类"""
|
|
|
|
cid = ValidateAttr(field='cid', type=str)
|
|
pwd = ValidateAttr(field='pwd', func=Validate.password, error_info='密码强度不够')
|
|
name = ValidateAttr(field='name', type=str)
|
|
email = ValidateAttr(field='email', func=Validate.email, error_info='邮箱格式错误')
|
|
telephone = ValidateAttr(field='telephone', func=Validate.telephone, error_info='手机号格式错误')
|
|
register_time = ValidateAttr(field='register_time', func=Validate.time_format)
|
|
|
|
fields_map = {
|
|
"cid": "企业ID",
|
|
"pwd": "密码",
|
|
"name": "企业名称",
|
|
"email": "邮箱",
|
|
"telephone": "手机号",
|
|
"register_time": "注册时间"
|
|
}
|