"""Registered AMDBS users -- section 17, additive (accounts/ratings/ watchlist). The first authenticated-user concept in Aurora Core; every other entity in this codebase is public, read-only catalog data.""" from __future__ import annotations from sqlalchemy import Boolean, String from sqlalchemy.orm import Mapped, mapped_column from app.models.base import Base, TimestampMixin, UUIDPrimaryKeyMixin class User(Base, UUIDPrimaryKeyMixin, TimestampMixin): __tablename__ = "users" # Stored lowercased (see app.core.auth._normalize_email) so lookups and # the unique constraint are case-insensitive without a functional index. email: Mapped[str] = mapped_column(String(320), unique=True, nullable=False, index=True) hashed_password: Mapped[str] = mapped_column(String(255), nullable=False) display_name: Mapped[str | None] = mapped_column(String(100), nullable=True) is_active: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False) __all__ = ["User"]