From 7ea5ec430b1f67fc7b36ef61aa9d506a8972e33d Mon Sep 17 00:00:00 2001 From: 0919word <835535015@qq.com> Date: Mon, 21 Sep 2026 09:50:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E7=AE=A1=E7=90=86=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PythonProject/model/class_model.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/PythonProject/model/class_model.py b/PythonProject/model/class_model.py index c028862..4891bd1 100644 --- a/PythonProject/model/class_model.py +++ b/PythonProject/model/class_model.py @@ -1,9 +1,6 @@ -from fastapi import FastAPI -from sqlalchemy import DateTime,Date,create_engine,Column,Integer,ForeignKey,Boolean -from sqlalchemy.orm import declarative_base -from pydantic import BaseModel - +from sqlalchemy import DateTime,Date,Column,Integer,ForeignKey,Boolean +from util.database import Base,engine class ClassManagement(Base): __tablename__ = "wl_class" @@ -30,10 +27,10 @@ class ClassManagement(Base): delete_time = Column(DateTime, nullable=True, comment='删除时间') Base.metadata.create_all(engine) -/ -app=FastAPI(title='学生管理系统班级管理') -class ClassRequest(BaseModel): - class_id: int | None = None + + + +