refactor(backend): 后端重构初步设想
This commit is contained in:
1 parent
b69d549b2c
commit
21b8c24815
96 files changed
+1592
No files matched your search
@@ -0,0 +1,12 @@
|
||||
"""
|
||||
backend/app/extensions.py
|
||||
|
||||
用途:Flask 扩展实例(db、migrate)集中定义;Wave 1 从 __init__.py 迁入并接线。
|
||||
依赖:flask_sqlalchemy、flask_migrate。
|
||||
逻辑:create_app 调用 db.init_app(app);models 与各 service 从本模块 import db。
|
||||
"""
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_migrate import Migrate
|
||||
|
||||
db = SQLAlchemy()
|
||||
migrate = Migrate()
|
||||
Reference in new issue
Block a user