写好了增加学生接口,增加学生dao层,main里加入了student——router

This commit is contained in:
wolin_liyujie
2026-09-21 16:19:44 +08:00
parent da71b48a10
commit 1a8e4f7571
9 changed files with 82 additions and 55 deletions
+13
View File
@@ -0,0 +1,13 @@
from models import *
from core.database import *
from sqlalchemy import create_engine
db_url = "mysql+pymysql://root:123456@127.0.0.1:3306/student_manager?charset=utf8mb4"
engine = create_engine(db_url
,pool_size=50
,echo=True)
Base.metadata.create_all(engine)
db = SessionLocal()
db.commit()