12 lines
330 B
Python
12 lines
330 B
Python
"""数据模型 —— 用户表"""
|
|
from sqlalchemy import Column, Integer, String
|
|
from database import Base
|
|
|
|
|
|
class User(Base):
|
|
__tablename__ = "users"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
username = Column(String, unique=True, index=True, nullable=False)
|
|
password = Column(String, nullable=False)
|