recruitment =========== .. py:module:: sidequest_common.models.recruitment .. autoapi-nested-parse:: Recruitment drive persistence: the in-game guild log and per-recruit qualification state. See ``local://recruitment-contract.md``. A drive is a ``GuildEvent`` of kind ``recruitment``; this module holds the guild log rows the drive tracking is built from, and the derived per-recruit rows ``RecruitmentService`` computes and keeps current (``sidequest_api.domain.recruitment.services``). .. py:data:: DRIVE_RECRUIT_STATUSES :value: ('invited', 'counting', 'qualified', 'disqualified') .. py:data:: DRIVE_RECRUIT_REASONS :value: ('returning', 'own_alt', 'left', 'low_level', 'never_joined') .. py:data:: GUILD_LOG_KINDS :value: ('invite', 'join', 'quit', 'remove') .. py:data:: PAID_VIA_VALUES :value: ('site', 'addon') .. py:class:: GuildLogEntry Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` One in-game guild event log row, upserted from officers' addon exports (2-hour dedupe on import). ``actor`` is the inviter for ``invite``, the member for ``join``/``quit``, or the removing officer for ``remove``; ``target`` is the invitee for ``invite`` or the removed member for ``remove``, and ``None`` for ``join``/``quit``. ``recorder`` is the addon account that uploaded it. ``promote``/``demote`` are never stored (the addon never exports them). .. py:attribute:: kind :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: actor :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: target :type: sqlalchemy.orm.Mapped[str | None] .. py:attribute:: at :type: sqlalchemy.orm.Mapped[datetime.datetime] .. py:attribute:: recorder :type: sqlalchemy.orm.Mapped[str] .. py:class:: RecruitmentRecruit Bases: :py:obj:`advanced_alchemy.base.UUIDAuditBase` One recruit's qualification state for one drive, upserted by ``RecruitmentService.evaluate``. ``recruit_character_id``/``inviter_character_id`` link to ``WowCharacter`` when the name matches exactly one; the "own alt" disqualification compares their ``member_id``. ``reward_copper`` is unused (the drive's prize goes to whichever inviter has the most qualifying recruits, not per recruit); it keeps its column and default for rolling deploys. ``status``/``reason`` are ``DriveRecruitStatus``/``DriveRecruitReason`` values; ``paid_via`` is ``PaidVia``. .. py:attribute:: event_id :type: sqlalchemy.orm.Mapped[uuid.UUID] .. py:attribute:: recruit_name :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: recruit_character_id :type: sqlalchemy.orm.Mapped[uuid.UUID | None] .. py:attribute:: inviter_name :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: inviter_character_id :type: sqlalchemy.orm.Mapped[uuid.UUID | None] .. py:attribute:: invited_at :type: sqlalchemy.orm.Mapped[datetime.datetime] .. py:attribute:: joined_at :type: sqlalchemy.orm.Mapped[datetime.datetime | None] .. py:attribute:: qualifies_at :type: sqlalchemy.orm.Mapped[datetime.datetime | None] .. py:attribute:: status :type: sqlalchemy.orm.Mapped[str] .. py:attribute:: reason :type: sqlalchemy.orm.Mapped[str | None] .. py:attribute:: level :type: sqlalchemy.orm.Mapped[int | None] .. py:attribute:: qualified_at :type: sqlalchemy.orm.Mapped[datetime.datetime | None] .. py:attribute:: shoutout_posted_at :type: sqlalchemy.orm.Mapped[datetime.datetime | None] .. py:attribute:: reward_copper :type: sqlalchemy.orm.Mapped[int] the prize is per-inviter (most qualifying recruits), not per recruit. Kept for rolling deploys. :type: Unused .. py:attribute:: paid_at :type: sqlalchemy.orm.Mapped[datetime.datetime | None] .. py:attribute:: paid_by :type: sqlalchemy.orm.Mapped[str | None] .. py:attribute:: paid_via :type: sqlalchemy.orm.Mapped[str | None]