学生管理模块&就业模块
This commit is contained in:
+1
-50
@@ -70,53 +70,4 @@ class StudentClassIntermediate(Base):
|
||||
student_id =Column(String(20))
|
||||
is_deleted= Column(Integer)
|
||||
create_time= Column(DateTime)
|
||||
update_time= Column(DateTime)
|
||||
|
||||
|
||||
|
||||
|
||||
class GenderEnum(str, enum.Enum):
|
||||
FEMALE = '0'
|
||||
MALE = '1'
|
||||
|
||||
class StudentStatusEnum(str, enum.Enum):
|
||||
NORMAL = '0' # 正常
|
||||
SUSPENDED = '1' # 休学
|
||||
DROPPED = '2' # 退学
|
||||
GRADUATED = '3' # 毕业
|
||||
OTHER = '4' # 其他
|
||||
|
||||
class EducationLevelEnum(str, enum.Enum):
|
||||
COLLEGE = '1' # 大专
|
||||
UNDERGRADUATE = '2' # 本科
|
||||
MASTER = '3' # 硕士
|
||||
DOCTOR = '4' # 博士
|
||||
|
||||
class IsDeletedEnum(str, enum.Enum):
|
||||
ACTIVE = '0' # 未删除
|
||||
DELETED = '1' # 已删除
|
||||
|
||||
# 3. 定义学生模型类
|
||||
class Student_info(Base):
|
||||
__tablename__ = "student_info"
|
||||
student_id = Column(String(20),primary_key=True, comment='学号')
|
||||
student_name = Column(String(50), nullable=False, comment='学生姓名')
|
||||
gender = Column(Enum(GenderEnum), nullable=False, comment='性别: 0=女, 1=男')
|
||||
id_card = Column(String(18), nullable=False, comment='身份证号码,收紧至18位')
|
||||
birthday = Column(Date, nullable=True, comment='出生日期')
|
||||
ethnicity = Column(String(20), nullable=True, comment='民族')
|
||||
region_id = Column(String(12), nullable=True, comment='籍贯地区编码,外键关联地区维度表(region_dimension)')
|
||||
phone = Column(String(11), nullable=True, comment='手机号码,收紧至11位')
|
||||
graduation_school = Column(String(20), nullable=True, comment='毕业学校')
|
||||
major = Column(String(20), nullable=False, comment='就读专业')
|
||||
class_id = Column(String(20), nullable=False, index=True, comment='所在班级,外键关联班级表(class_info)')
|
||||
enrollment_date = Column(Date, nullable=True, comment='入学日期')
|
||||
graduation_date = Column(Date, nullable=True, comment='毕业日期')
|
||||
student_status = Column(Enum(StudentStatusEnum), nullable=False, default=StudentStatusEnum.NORMAL,
|
||||
comment='学籍状态')
|
||||
education_level = Column(Enum(EducationLevelEnum), nullable=False,
|
||||
comment='学历层次:1=大专, 2=本科, 3=硕士研究生, 4=博士研究生')
|
||||
is_deleted = Column(Enum(IsDeletedEnum), nullable=False, default=IsDeletedEnum.ACTIVE,
|
||||
comment='逻辑删除:0=未删除, 1=已删除')
|
||||
create_time = Column(DateTime, nullable=False, server_default=func.now(), comment='创建时间')
|
||||
update_time = Column(DateTime, nullable=False, server_default=func.now(), onupdate=func.now(), comment='更新时间')
|
||||
update_time= Column(DateTime)
|
||||
Reference in New Issue
Block a user