cqwu-ehall/cqwu/types/cp.py

122 lines
2.3 KiB
Python
Raw Permalink Normal View History

2023-03-26 05:23:57 +00:00
from typing import List
from pydantic import BaseModel
class CP(BaseModel):
id: int
name: str
xue_nian: str
xue_qi: str
score: float
class_rank: int
class_member: int
grade_rank: int
grade_member: int
dysz: float
zysz: float
cxsz: float
wtsz: float
zysz_class_rank: int
zysz_grade_rank: int
2023-03-26 05:23:57 +00:00
class PublicCPRaw(BaseModel):
XH: str
XM: str
DWDM_DISPLAY: str
ZYDM_DISPLAY: str
BJDM_DISPLAY: str
ZCJ: float
BJPM: int
ZYNJPM: int
FS1: float
FS10: float
FS11: float
FS12: float
DYYSCJ: str
WTYSCJ: str
CXYSCJ: str
@property
def id(self) -> int:
2023-12-29 10:04:00 +00:00
"""学号"""
2023-03-26 05:23:57 +00:00
return int(self.XH)
@property
def name(self) -> str:
2023-12-29 10:04:00 +00:00
"""姓名"""
2023-03-26 05:23:57 +00:00
return self.XM
@property
def yuan_xi(self) -> str:
2023-12-29 10:04:00 +00:00
"""院系"""
2023-03-26 05:23:57 +00:00
return self.DWDM_DISPLAY
@property
def zhuan_ye(self) -> str:
2023-12-29 10:04:00 +00:00
"""专业"""
2023-03-26 05:23:57 +00:00
return self.ZYDM_DISPLAY
@property
def class_name(self) -> str:
2023-12-29 10:04:00 +00:00
"""班级"""
2023-03-26 05:23:57 +00:00
return self.BJDM_DISPLAY
@property
def total_score(self) -> float:
2023-12-29 10:04:00 +00:00
"""总成绩"""
2023-03-26 05:23:57 +00:00
return float(self.ZCJ)
@property
def class_rank(self) -> int:
2023-12-29 10:04:00 +00:00
"""班级排名"""
2023-03-26 05:23:57 +00:00
return int(self.BJPM)
@property
def grade_rank(self) -> int:
2023-12-29 10:04:00 +00:00
"""专业年级排名"""
2023-03-26 05:23:57 +00:00
return int(self.ZYNJPM)
@property
def dysz(self) -> float:
2023-12-29 10:04:00 +00:00
"""德育素质分"""
2023-03-26 05:23:57 +00:00
return float(self.FS1)
@property
def zysz(self) -> float:
2023-12-29 10:04:00 +00:00
"""智育素质测评"""
2023-03-26 05:23:57 +00:00
return float(self.FS10)
@property
def cxsz(self) -> float:
2023-12-29 10:04:00 +00:00
"""创新素质测评"""
2023-03-26 05:23:57 +00:00
return float(self.FS11)
@property
def wtsz(self) -> float:
2023-12-29 10:04:00 +00:00
"""文体素质"""
2023-03-26 05:23:57 +00:00
return float(self.FS12)
@property
def dysz_raw(self) -> float:
2023-12-29 10:04:00 +00:00
"""德育原始成绩"""
2023-03-26 05:23:57 +00:00
return float(self.DYYSCJ)
@property
def wtsz_raw(self) -> float:
2023-12-29 10:04:00 +00:00
"""文体原始成绩"""
2023-03-26 05:23:57 +00:00
return float(self.WTYSCJ)
@property
def cxsz_raw(self) -> float:
2023-12-29 10:04:00 +00:00
"""创新原始成绩"""
2023-03-26 05:23:57 +00:00
return float(self.CXYSCJ)
class CPGS(BaseModel):
totalSize: int
pageNumber: int
pageSize: int
rows: List[PublicCPRaw]