add fastapi init

This commit is contained in:
XIE7654
2025-07-16 21:14:02 +08:00
parent ed3e325962
commit 682e3805eb
11 changed files with 155 additions and 0 deletions

16
chat/models/user.py Normal file
View File

@@ -0,0 +1,16 @@
from sqlalchemy import Column, Integer, String, DateTime
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class AuthToken(Base):
__tablename__ = 'authtoken_token'
key = Column(String(40), primary_key=True)
user_id = Column(Integer, nullable=False)
created = Column(DateTime)
class DjangoUser(Base):
__tablename__ = 'system_users'
id = Column(Integer, primary_key=True)
username = Column(String(150), nullable=False)
email = Column(String(254))