directory ========= .. py:module:: sidequest_common.models.directory .. autoapi-nested-parse:: The guild directory's per-character storage (``addon/docs/directory.md`` in the addon repo is the contract). ``CharacterDirectorySection`` tracks the last applied ``at`` per character+section (``prof``/``char``/``cd``/ ``market``/``stock``) so newest-``at``-wins and tombstones (``d: null``) can be enforced uniformly; the ``prof`` section's data itself lands in the existing ``CharacterProfession``/``ProfessionRecipe``/``CharacterRecipeLink`` tables (replacing that character's professions wholesale), while ``char``/``cd``/``market``/``stock`` each get one row per character here, deleted on a tombstone. ``ItemName`` is the shared item id -> name table fed by the export's ``item_names``; names are kept, never cleared, when a later export omits one. .. py:class:: CharacterDirectorySection Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` Freshness tracker: the last applied ``at`` for one character's directory section. Checked before writing any of the four tables below, and before replacing a character's professions from a ``prof`` section; an incoming ``at`` no newer than this is skipped. .. py:attribute:: character_id :type: sqlalchemy.orm.Mapped[uuid.UUID] .. py:attribute:: section :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: at :type: sqlalchemy.orm.Mapped[datetime.datetime] .. py:class:: CharacterDirectoryChar Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` Latest ``char`` directory section per character: basics, attunements, and tracked reputations. .. py:attribute:: character_id :type: sqlalchemy.orm.Mapped[uuid.UUID] .. py:attribute:: level :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: wow_class :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: race :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: spec :type: sqlalchemy.orm.Mapped[str | None] .. py:attribute:: item_level :type: sqlalchemy.orm.Mapped[float | None] .. py:attribute:: attunements :type: sqlalchemy.orm.Mapped[list] .. py:attribute:: reputations :type: sqlalchemy.orm.Mapped[list] .. py:class:: CharacterDirectoryCooldowns Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` Latest ``cd`` directory section per character: craft cooldowns and when each is ready. .. py:attribute:: character_id :type: sqlalchemy.orm.Mapped[uuid.UUID] .. py:attribute:: cooldowns :type: sqlalchemy.orm.Mapped[list] .. py:class:: CharacterDirectoryMarket Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` Latest ``market`` directory section per character: sell/buy listings and open material requests. .. py:attribute:: character_id :type: sqlalchemy.orm.Mapped[uuid.UUID] .. py:attribute:: sell :type: sqlalchemy.orm.Mapped[list] .. py:attribute:: buy :type: sqlalchemy.orm.Mapped[list] .. py:attribute:: requests :type: sqlalchemy.orm.Mapped[list] .. py:class:: CharacterDirectoryStock Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` Latest ``stock`` directory section per character: crafting materials held in bags and bank. .. py:attribute:: character_id :type: sqlalchemy.orm.Mapped[uuid.UUID] .. py:attribute:: bags :type: sqlalchemy.orm.Mapped[list] .. py:attribute:: bank :type: sqlalchemy.orm.Mapped[list] .. py:attribute:: bank_at :type: sqlalchemy.orm.Mapped[datetime.datetime | None] .. py:class:: ItemName Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` Item id -> display name, fed by the export's ``item_names``. Names are kept, never cleared. .. py:attribute:: item_id :type: sqlalchemy.orm.Mapped[int] .. py:attribute:: name :type: sqlalchemy.orm.Mapped[str]