Automated Action e01f6aaf16 Fix linting issues and finalize User Authentication Service
- Removed unused imports in deps.py, routes/auth.py, and models/user.py
- Code is now lint-free and follows best practices
- Complete FastAPI user authentication service with JWT token support

generated with BackendIM... (backend.im)
2025-05-14 09:46:58 +00:00

17 lines
664 B
Python

from datetime import datetime
from sqlalchemy import Boolean, Column, DateTime, Integer, String
from app.db.session import Base
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True, index=True)
email = Column(String, unique=True, index=True, nullable=False)
username = Column(String, unique=True, index=True, nullable=False)
hashed_password = Column(String, nullable=False)
is_active = Column(Boolean, default=True)
is_superuser = Column(Boolean, default=False)
created_at = Column(DateTime, default=datetime.utcnow)
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)