Files
gh-christianlouis-dmarq/backend/app/models/user.py
T
google-labs-jules[bot] 1831c1a079 🔒 security: move IMAP credentials to request body and fix CI/pylint issues
- Moved IMAP credentials from query parameters to the request body for the test-connection endpoint.
- Created missing `__init__.py` files across `backend/app/` to fix CI `ModuleNotFoundError`.
- Reformatted `setup.py` and `user.py` using `black` to pass lint checks.
- Addressed Pylint warnings in `imap.py` (unused arguments, lazy logging, exception chaining).

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-23 18:57:40 +00:00

25 lines
764 B
Python

from sqlalchemy import Boolean, Column, Integer, String
from sqlalchemy.orm import relationship
from app.core.database import Base
class User(Base):
"""User model"""
__tablename__ = "users"
id = Column(Integer, primary_key=True, index=True)
email = 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)
is_verified = Column(Boolean, default=False)
# Additional fields
full_name = Column(String, nullable=True)
organization = Column(String, nullable=True)
# Relationships
user_domains = relationship("UserDomain", back_populates="user", cascade="all, delete-orphan")