6ae017b142
- Auto-format all Python files with black and isort - Remove unused imports with autoflake - Fix flake8 issues (missing newlines, blank lines, etc.) - Fix nonlocal/global scope issues in main.py - Fix security.py import order (E402) - Remove f-string without placeholders - Add nosec comment for intentional exception handling - Fix test imports to match refactored DMARCParser API Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
25 lines
764 B
Python
25 lines
764 B
Python
|
|
from app.core.database import Base
|
|
from sqlalchemy import Boolean, Column, Integer, String
|
|
from sqlalchemy.orm import relationship
|
|
|
|
|
|
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")
|