first commit
This commit is contained in:
16
models/base.py
Normal file
16
models/base.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""SQLAlchemy Base 定义与示例模型
|
||||
|
||||
提供 SQLAlchemy 的 Base 供后续 ORM 模型继承。
|
||||
"""
|
||||
|
||||
from sqlalchemy.orm import declarative_base
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
# 示例:如需添加ORM模型,可参考以下结构
|
||||
# from sqlalchemy import Column, Integer, String
|
||||
# class User(Base):
|
||||
# __tablename__ = "users"
|
||||
# id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
# name = Column(String(100), nullable=False)
|
||||
|
||||
Reference in New Issue
Block a user