同步业务名称导致需要同步修改业务代码,现全部更新完毕,初步测试增删改查没有问题。

This commit is contained in:
Orangeeee
2026-09-22 10:08:56 +08:00
parent fe7c95fa78
commit c8961950ea
4 changed files with 125 additions and 78 deletions
+7 -5
View File
@@ -4,7 +4,8 @@ import datetime
from students.databases import *
from datetime import datetime
from sqlalchemy.dialects.mysql import DATETIME
from students.schema.students_request import SexEnum
from students.schema.students_request import SexEnum , EducationEnum
from sqlalchemy import Enum
class Students(Base):
__tablename__ = 'students'
@@ -27,7 +28,7 @@ class Students(Base):
, comment='年龄'
, nullable=False)
sex = Column(Enum(SexEnum)
sex = Column(Enum(SexEnum, values_callable=lambda e: [i.value for i in e])
, comment='性别'
, nullable=False)
@@ -46,15 +47,16 @@ class Students(Base):
graduate_time = Column(DATETIME
, comment='毕业时间')
education = Column(String(50)
, comment='学历')
education = Column(Enum(EducationEnum, values_callable=lambda e: [i.value for i in e])
, comment='学历'
, nullable=True)
# 外键字段
class_id = Column(Integer
, comment='学生班级'
, nullable=False )
adnisor_id = Column(Integer
advisor_id = Column(Integer
, comment='顾问ID')
# 额外字段