From d2c61918dd3ee537d4cafbd1a03696667f751524 Mon Sep 17 00:00:00 2001 From: maruizhi <3088243241@qq.com> Date: Thu, 24 Sep 2026 15:04:46 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 3 +++ model/all_model.py | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/main.py b/main.py index e69de29..cb1de98 100644 --- a/main.py +++ b/main.py @@ -0,0 +1,3 @@ +from fastapi import FastAPI + +app = FastAPI(title='沃林学生管理系统') diff --git a/model/all_model.py b/model/all_model.py index 0fadcaf..bc25577 100644 --- a/model/all_model.py +++ b/model/all_model.py @@ -15,7 +15,7 @@ class Class(Base): actual_end_date = Column(DateTime, comment="实际结课时间") created_at = Column(DateTime, comment="数据创建时间") updated_at = Column(DateTime, comment="数据更新时间") - is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") + is_deleted = Column(Integer,default=False, nullable=False, comment="逻辑删除字段") class CodeValue(Base): """对应 Excel Sheet:码值表。""" @@ -29,7 +29,7 @@ class CodeValue(Base): is_enabled = Column(Boolean, comment="状态(是否可用)") created_at = Column(DateTime, comment="数据创建时间") updated_at = Column(DateTime, comment="数据更新时间") - is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") + is_deleted = Column(Integer,default=False, nullable=False, comment="逻辑删除字段") class Company(Base): """对应 Excel Sheet:企业信息表。""" @@ -45,7 +45,7 @@ class Company(Base): registered_capital = Column(Numeric(16, 2), comment="注册资金") created_at = Column(DateTime, comment="数据创建时间") updated_at = Column(DateTime, comment="数据更新时间") - is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") + is_deleted = Column(Integer,default=False, nullable=False, comment="逻辑删除字段") class Course(Base): """对应 Excel Sheet:课程表。""" @@ -58,7 +58,7 @@ class Course(Base): planned_training_hours = Column(Numeric(8, 2), comment="计划培训课时") created_at = Column(DateTime, comment="数据创建时间") updated_at = Column(DateTime, comment="数据更新时间") - is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") + is_deleted = Column(Integer,default=False, nullable=False, comment="逻辑删除字段") class Employee(Base): """对应 Excel Sheet:员工表。""" @@ -77,7 +77,7 @@ class Employee(Base): position_level = Column(String(50), comment="岗位级别") created_at = Column(DateTime, comment="数据创建时间") updated_at = Column(DateTime, comment="数据更新时间") - is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") + is_deleted = Column(Integer,default=False, nullable=False, comment="逻辑删除字段") class EmploymentInfo(Base): """对应 Excel Sheet:就业信息表。""" @@ -92,7 +92,7 @@ class EmploymentInfo(Base): offer_received_at = Column(DateTime, comment="拿到offer时间") created_at = Column(DateTime, comment="数据创建时间") updated_at = Column(DateTime, comment="数据更新时间") - is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") + is_deleted = Column(Integer,default=False, nullable=False, comment="逻辑删除字段") class Grade(Base): """对应 Excel Sheet:成绩表。""" @@ -106,7 +106,7 @@ class Grade(Base): score = Column(Numeric(5, 2), comment="分数") created_at = Column(DateTime, comment="数据创建时间") updated_at = Column(DateTime, comment="数据更新时间") - is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") + is_deleted = Column(Integer,default=False, nullable=False, comment="逻辑删除字段") class Interview(Base): """对应 Excel Sheet:面试信息表。""" @@ -122,7 +122,7 @@ class Interview(Base): result = Column(Boolean, comment="面试结果") created_at = Column(DateTime, comment="数据创建时间") updated_at = Column(DateTime, comment="数据更新时间") - is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") + is_deleted = Column(Integer,default=False, nullable=False, comment="逻辑删除字段") class Relation(Base): """对应 Excel Sheet:关联关系表。""" @@ -135,7 +135,7 @@ class Relation(Base): relation_type = Column(String(50), comment="关系类型") created_at = Column(DateTime, comment="数据创建时间") updated_at = Column(DateTime, comment="数据更新时间") - is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") + is_deleted = Column(Integer,default=False, nullable=False, comment="逻辑删除字段") class Student(Base): """对应 Excel Sheet:学生表。""" @@ -162,6 +162,6 @@ class Student(Base): remark = Column(String(1000), comment="备注") created_at = Column(DateTime, comment="数据创建时间") updated_at = Column(DateTime, comment="数据更新时间") - is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") + is_deleted = Column(Integer,default=False, nullable=False, comment="逻辑删除字段") -Base.metadate.create_all(engine) \ No newline at end of file +Base.metadata.create_all(engine) \ No newline at end of file