Conding #5
@@ -1,5 +1,5 @@
|
||||
|
||||
from sqlalchemy import DateTime,Date,Column,Integer,ForeignKey,Boolean
|
||||
from sqlalchemy import DateTime,Date,Column,Integer,ForeignKey,Boolean,String
|
||||
from util.database import Base,engine
|
||||
|
||||
class ClassManagement(Base):
|
||||
@@ -7,6 +7,8 @@ class ClassManagement(Base):
|
||||
|
||||
class_id= Column(Integer, primary_key=True, autoincrement=True,comment='班级编号')
|
||||
|
||||
class_name = Column(String(100), comment='班级姓名')
|
||||
|
||||
start_class_date = Column(Date,comment='开课时间')
|
||||
|
||||
head_teacher_id= Column(Integer,ForeignKey('wl_teacher.id'),comment='班主任')
|
||||
@@ -18,12 +20,8 @@ class ClassManagement(Base):
|
||||
update_date = Column(DateTime,comment='更新时间')
|
||||
|
||||
delete_status = Column(
|
||||
Boolean,
|
||||
nullable=False,
|
||||
default=False,
|
||||
server_default='0',
|
||||
comment='删除状态:0未删除,1已删除'
|
||||
)
|
||||
Integer,default=0,comment='删除状态:0未删除,1已删除')
|
||||
|
||||
delete_time = Column(DateTime, nullable=True, comment='删除时间')
|
||||
|
||||
Base.metadata.create_all(engine)
|
||||
|
||||
@@ -4,45 +4,56 @@ from datetime import datetime
|
||||
|
||||
class Employment_info(Base):
|
||||
__tablename__ = 'wl_employment'
|
||||
|
||||
emp_id = Column(Integer
|
||||
,primary_key=True
|
||||
,autoincrement=True
|
||||
,comment='序号'
|
||||
)
|
||||
|
||||
stu_id = Column(Integer
|
||||
,ForeignKey('wl_student.stu_id')
|
||||
,nullable=False
|
||||
,comment='学生编号'
|
||||
)
|
||||
|
||||
email = Column(String(50)
|
||||
,unique=True
|
||||
,comment='邮箱'
|
||||
)
|
||||
|
||||
employment_opening_date = Column(DATE
|
||||
,comment='就业开放日期'
|
||||
)
|
||||
|
||||
offer_issuance_date = Column(DATE
|
||||
,comment='offer下发日期'
|
||||
)
|
||||
|
||||
company_name = Column(String(50)
|
||||
,comment='就业公司名称'
|
||||
)
|
||||
|
||||
company_address = Column(String(100)
|
||||
,comment='就业公司地址')
|
||||
salary = Column(Integer
|
||||
,comment='薪资')
|
||||
deletion_status = Column(Integer
|
||||
,default=0
|
||||
,comment='信息留存状态【0:初始值;1:已删除】'
|
||||
,comment='就业公司地址'
|
||||
)
|
||||
|
||||
salary = Column(Integer
|
||||
,comment='薪资'
|
||||
)
|
||||
|
||||
create_time = Column(DATETIME
|
||||
,default=datetime.now
|
||||
,comment='创建时间'
|
||||
)
|
||||
|
||||
update_time = Column(DATETIME
|
||||
,default=datetime.now
|
||||
,onupdate=datetime.now
|
||||
,comment='更新时间'
|
||||
)
|
||||
|
||||
delete_status = Column(
|
||||
Integer,default=0,comment='删除状态:0未删除,1已删除')
|
||||
|
||||
Base.metadata.create_all(engine)
|
||||
@@ -1,14 +1,22 @@
|
||||
from sqlalchemy import Column, BigInteger, Integer, String, Numeric, TinyInteger, DateTime
|
||||
from sqlalchemy.orm import declarative_base
|
||||
from sqlalchemy import Column, Integer, Numeric, DateTime,ForeignKey
|
||||
from datetime import datetime
|
||||
from util.database import Base,engine
|
||||
|
||||
# 成绩、删除状态(0:已删除,1:初始值)、作成时间、更新时间
|
||||
class WlScore(Base):
|
||||
__tablename__ = 'Assessment grade'
|
||||
stu_id = Column( Integer
|
||||
__tablename__ = 'wl_score'
|
||||
|
||||
score_id = Column(Integer
|
||||
,primary_key=True
|
||||
,autoincrement=True
|
||||
,comment='学生编号,自增主键')
|
||||
,comment='序号'
|
||||
)
|
||||
|
||||
stu_id = Column( Integer
|
||||
,ForeignKey('wl_student.stu_id')
|
||||
,autoincrement=True
|
||||
,comment='学生编号')
|
||||
|
||||
exam_order = Column(Integer
|
||||
, nullable=False
|
||||
, comment="考核序次")
|
||||
@@ -16,11 +24,6 @@ class WlScore(Base):
|
||||
score=Column(Numeric(5, 2)
|
||||
, comment="成绩")
|
||||
|
||||
del_flag = Column(Integer
|
||||
, nullable=False
|
||||
, default=1
|
||||
, comment="删除状态(0:已删除,1:初始值)")
|
||||
|
||||
create_time = Column(DateTime
|
||||
, nullable=False
|
||||
, default=datetime.now
|
||||
@@ -31,5 +34,9 @@ class WlScore(Base):
|
||||
, default=datetime.now
|
||||
, onupdate=datetime.now
|
||||
, comment="更新时间")
|
||||
|
||||
delete_status = Column(
|
||||
Integer,default=0,comment='删除状态:0未删除,1已删除')
|
||||
|
||||
Base.metadata.create_all(engine)
|
||||
|
||||
|
||||
@@ -4,29 +4,47 @@ from util.database import Base,engine
|
||||
|
||||
class Student_Model(Base):
|
||||
__tablename__ = 'wl_student'
|
||||
|
||||
stu_id = Column(Integer
|
||||
, primary_key=True
|
||||
, autoincrement=True
|
||||
,comment='学生编号')
|
||||
|
||||
class_id=Column(Integer
|
||||
,ForeignKey('wl_class.class_id')
|
||||
,nullable=False
|
||||
,comment='班级编号')
|
||||
|
||||
stu_name=Column(String(100),comment='学生姓名')
|
||||
|
||||
age=Column(Integer,comment='年龄')
|
||||
|
||||
gender=Column(String(50),comment='性别')
|
||||
|
||||
native_place=Column(String(200),comment='籍贯')
|
||||
|
||||
birthday=Column(Date,comment='生日')
|
||||
|
||||
school=Column(String(100),comment='毕业学校')
|
||||
|
||||
major=Column(String(50),comment='专业')
|
||||
|
||||
degree=Column(String(50),comment='学历')
|
||||
|
||||
admission_date=Column(Date,comment='入学日期')
|
||||
|
||||
graduation_date=Column(Date,comment='毕业日期')
|
||||
|
||||
progress=Column(Integer,default=0,comment='课程进度:学习中=0,求职中=1,已就业=2')
|
||||
|
||||
create_date=Column(DATETIME
|
||||
,default=datetime.now)
|
||||
|
||||
update_date=Column(DATETIME
|
||||
,default=datetime.now
|
||||
,onupdate=datetime.now)
|
||||
|
||||
delete_status = Column(
|
||||
Integer,default=0,comment='删除状态:0未删除,1已删除')
|
||||
|
||||
Base.metadata.create_all(engine)
|
||||
|
||||
@@ -4,14 +4,23 @@ from util.database import Base,engine
|
||||
|
||||
class Teacher_Model(Base):
|
||||
__tablename__ = 'wl_teacher'
|
||||
|
||||
teac_id=Column(Integer,primary_key=True,autoincrement=True,comment='老师编号')
|
||||
|
||||
teac_name=Column(String(20),comment='老师姓名')
|
||||
|
||||
teac_gender=Column(String(5),comment='老师性别')
|
||||
|
||||
teac_age=Column(Integer,comment='老师年龄')
|
||||
|
||||
teac_position =Column(String(20),comment='老师职位')
|
||||
status=Column(Integer,default=0,comment='课程进度:学习中=0,求职中=1,已就业=2')
|
||||
|
||||
create_date=Column(DATETIME,default=datetime.now)
|
||||
|
||||
update_date=Column(DATETIME,default=datetime.now,onupdate=datetime.now)
|
||||
|
||||
delete_status = Column(
|
||||
Integer,default=0,comment='删除状态:0未删除,1已删除')
|
||||
|
||||
Base.metadata.create_all(engine)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user