小组更新同步 所有库名、表名、model字段名 等。

This commit is contained in:
Orangeeee
2026-09-21 21:49:16 +08:00
parent e71ac77c76
commit 1f87616004
2 changed files with 72 additions and 13 deletions
+58 -13
View File
@@ -4,34 +4,79 @@ import datetime
from students.databases import *
from datetime import datetime
from sqlalchemy.dialects.mysql import DATETIME
from sqlalchemy import Enum
class Students(Base):
__tablename__ = 'students'
sid = Column(Integer
id = Column(Integer
, primary_key=True
, autoincrement=True
, comment='学生编号,自增主键'
, comment='学生ID,自增主键'
)
num = Column(Integer
, nullable=False
, unique=True
, comment='学生编号'
)
student_name = Column(String(20) , comment='学生姓名' , nullable=False )
name = Column(String(20)
, comment='学生姓名'
, nullable=False )
student_phone = Column(String(11) , comment='学生手机号' , nullable=False , unique=True )
age = Column(Integer
, comment='年龄'
, nullable=False)
class_name = Column(String(20) , comment='学生班级' , nullable=False )
sex = Column(Enum('男','女')
, comment='性别'
, nullable=False)
job_open_time = Column(DATETIME , comment='就业开放时间')
home_Place = Column(String(50)
, comment='籍贯')
offer_issue_time = Column(DATETIME , comment='offer下发时间')
college = Column(String(50)
, comment='毕业院校')
company_name = Column(String(100) , comment='就业公司名称')
specialty = Column(String(50)
, comment='专业')
salary = Column(Integer , comment='就业薪资')
enrollment_time = Column(DATETIME
, comment='入学时间')
create_date = Column(DATETIME(fsp=3) , default=datetime.now , comment='创建时间' )
graduate_time = Column(DATETIME
, comment='毕业时间')
update_date = Column(DATETIME(fsp=3) , default=datetime.now , comment='更新时间' )
education = Column(String(50)
, comment='学历')
is_deleted = Column(INTEGER , default=False , comment='是否删除:0-正常,1-已删除' )
# 外键字段
class_id = Column(Integer
, comment='学生班级'
, nullable=False )
deleted_date = Column(DATETIME(fsp=3) , default=None , comment='删除时间' )
adnisor_id = Column(Integer
, comment='顾问ID')
# 额外字段
phone = Column(String(11)
, comment='学生手机号'
, nullable=False
, unique=True )
# 通用字段
create_date = Column(DATETIME(fsp=6)
, default=datetime.now
, comment='创建时间' )
update_date = Column(DATETIME(fsp=6)
, default=datetime.now
, comment='更新时间' )
is_deleted = Column(INTEGER
, default=False
, comment='是否删除:0-正常,1-已删除' )
deleted_date = Column(DATETIME(fsp=6)
, default=None
, comment='删除时间' )