""" This module contains the models for the consumer logic. """ from dataclasses import dataclass from typing import Iterable @dataclass class ReportColumn: """ Represents a column in an Excel report. Attributes: alias (str): The alias of the column as it was output by the SQL query (e.g. "IPI", "PRO", "LEGAL_NAME", etc.). It will be converted to a human-readable name when writing to Excel. human_name (str): The human-readable name of the column, which will be used as the header in the Excel sheet. """ alias: str human_name: str @dataclass class ReportSheet: """ Represents a single sheet in an Excel report. Attributes: data (Iterable[dict]): The data rows to write, each dict representing one row. name (str): The name of the Excel sheet. columns (list[str]): The column order to use when writing the data. """ data: Iterable[dict] name: str columns: list[ReportColumn]