from datetime import datetime from sqlalchemy import func from sqlalchemy.orm import Mapped, mapped_column from app.adapters.db.orm import Model class FanProfile(Model, kw_only=True): __tablename__ = "fan_profile" email: Mapped[str] = mapped_column(primary_key=True) class BriteVerifyLists(Model, kw_only=True): __tablename__ = "briteverify_lists" id: Mapped[str] = mapped_column(primary_key=True) state: Mapped[str] processed: Mapped[bool] = mapped_column(default=False) created_at: Mapped[datetime | None] = mapped_column(nullable=True) updated_at: Mapped[datetime | None] = mapped_column(nullable=True) class BriteVerifyResults(Model, kw_only=True): __tablename__ = "briteverify_results" email: Mapped[str] = mapped_column(primary_key=True) status: Mapped[str] secondary_status: Mapped[str | None] = mapped_column(nullable=True) briteverify_list_id: Mapped[str | None] = mapped_column(nullable=True) created_at: Mapped[datetime | None] = mapped_column( nullable=True, server_default=func.current_timestamp() ) updated_at: Mapped[datetime | None] = mapped_column( nullable=True, server_default=func.current_timestamp() )