sidequest_common.schemas.attendance =================================== .. py:module:: sidequest_common.schemas.attendance .. autoapi-nested-parse:: Attendance: marking who came to an event, bot-reported voice time, and the GM attendance report. See ``sidequest_api.lib.attendance`` for the SQL conditions ``attended``/no-show status feed into. Classes ------- .. autoapisummary:: sidequest_common.schemas.attendance.AttendanceDetail sidequest_common.schemas.attendance.AttendanceEventSummary sidequest_common.schemas.attendance.AttendanceMark sidequest_common.schemas.attendance.AttendanceMarkEntry sidequest_common.schemas.attendance.AttendanceRange sidequest_common.schemas.attendance.AttendanceReport sidequest_common.schemas.attendance.AttendanceSignup sidequest_common.schemas.attendance.AttendanceTrendPoint sidequest_common.schemas.attendance.AttendanceTrends sidequest_common.schemas.attendance.MemberAttendanceRow sidequest_common.schemas.attendance.VoicePresenceEntry sidequest_common.schemas.attendance.VoicePresenceReport sidequest_common.schemas.attendance.WalkInCandidate sidequest_common.schemas.attendance.WalkInCreate Module Contents --------------- .. py:class:: AttendanceDetail Bases: :py:obj:`pydantic.BaseModel` ``GET/PUT /api/events/{id}/attendance`` (officer): the marking screen for one event. .. py:attribute:: event :type: AttendanceEventSummary .. py:attribute:: signups :type: list[AttendanceSignup] .. py:attribute:: walk_in_candidates :type: list[WalkInCandidate] .. py:class:: AttendanceEventSummary Bases: :py:obj:`pydantic.BaseModel` One past event, as listed on the attendance tab's event picker. .. py:attribute:: attendance_taken_at :type: datetime.datetime | None .. py:attribute:: id :type: uuid.UUID .. py:attribute:: kind :type: sidequest_common.schemas.events.EventKind .. py:attribute:: needs_attendance :type: bool .. py:attribute:: starts_at :type: datetime.datetime .. py:attribute:: status :type: sidequest_common.schemas.events.EventStatus .. py:attribute:: title :type: str .. py:class:: AttendanceMark Bases: :py:obj:`pydantic.BaseModel` Body for ``PUT /api/events/{id}/attendance`` (officer). Sets ``attendance_taken_at`` to now. Sign-ups not listed in ``entries`` are left as-is (unmarked, unless a previous save already marked them): tentative/absent sign-ups default to not marked. .. py:attribute:: entries :type: list[AttendanceMarkEntry] .. py:attribute:: walk_ins :type: list[WalkInCreate] .. py:class:: AttendanceMarkEntry Bases: :py:obj:`pydantic.BaseModel` One sign-up's Came/No-show decision. .. py:attribute:: attended :type: bool .. py:attribute:: signup_id :type: uuid.UUID .. py:class:: AttendanceRange Bases: :py:obj:`enum.StrEnum` A reporting window for ``GET /api/attendance/report`` and ``/trends``. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: ALL_TIME :value: 'all_time' .. py:attribute:: LAST_30 :value: 'last_30' .. py:attribute:: SEASON :value: 'season' .. py:class:: AttendanceReport Bases: :py:obj:`pydantic.BaseModel` ``GET /api/attendance/report`` (GM). .. py:attribute:: raids_only :type: bool .. py:attribute:: range :type: AttendanceRange .. py:attribute:: rows :type: list[MemberAttendanceRow] .. py:class:: AttendanceSignup Bases: :py:obj:`pydantic.BaseModel` One sign-up on the attendance marking screen, with the bot's reported voice time. .. py:attribute:: attended :type: bool | None .. py:attribute:: avatar_url :type: str | None .. py:attribute:: character :type: str | None .. py:attribute:: display_name :type: str .. py:attribute:: is_walk_in :type: bool .. py:attribute:: member_id :type: int .. py:attribute:: model_config .. py:attribute:: role :type: sidequest_common.schemas.events.SignupRole | None .. py:attribute:: signup_id :type: uuid.UUID .. py:attribute:: status :type: sidequest_common.schemas.events.SignupStatus .. py:attribute:: suggested_attended :type: bool .. py:attribute:: voice_minutes :type: int .. py:attribute:: wow_class :type: sidequest_common.schemas.events.WowClass | None .. py:class:: AttendanceTrendPoint Bases: :py:obj:`pydantic.BaseModel` One week's attendance on the trend chart. .. py:attribute:: attendees :type: int .. py:attribute:: show_rate :type: float .. py:attribute:: signed_up :type: int .. py:attribute:: week_start :type: datetime.date .. py:class:: AttendanceTrends Bases: :py:obj:`pydantic.BaseModel` ``GET /api/attendance/trends`` (GM): weekly attendance over the chosen range, oldest week first. .. py:attribute:: points :type: list[AttendanceTrendPoint] .. py:attribute:: raids_only :type: bool .. py:attribute:: range :type: AttendanceRange .. py:class:: MemberAttendanceRow Bases: :py:obj:`pydantic.BaseModel` One member's line on ``GET /api/attendance/report``. .. py:attribute:: attendance_rate :type: float .. py:attribute:: avatar_url :type: str | None .. py:attribute:: came :type: int .. py:attribute:: display_name :type: str .. py:attribute:: last_attended :type: datetime.datetime | None .. py:attribute:: member_id :type: int .. py:attribute:: no_shows :type: int .. py:attribute:: signed_up :type: int .. py:attribute:: walk_ins :type: int .. py:class:: VoicePresenceEntry Bases: :py:obj:`pydantic.BaseModel` One Discord member's cumulative voice minutes for an event, so far. .. py:attribute:: discord_id :type: str .. py:attribute:: minutes :type: int .. py:class:: VoicePresenceReport Bases: :py:obj:`pydantic.BaseModel` Bot -> API: cumulative voice minutes per member for one event, so far. Idempotent: the API stores ``max(existing, reported)`` per ``discord_id`` listed (never an increment, and never lowers a stored total), so the bot can push repeatedly -- including after its own in-memory counter has reset on restart -- without double-counting or regressing a member's total. .. py:attribute:: entries :type: list[VoicePresenceEntry] .. py:attribute:: event_id :type: uuid.UUID .. py:class:: WalkInCandidate Bases: :py:obj:`pydantic.BaseModel` A guild member not currently signed up for the event, offered as a walk-in on the marking screen. .. py:attribute:: avatar_url :type: str | None .. py:attribute:: display_name :type: str .. py:attribute:: member_id :type: int .. py:class:: WalkInCreate Bases: :py:obj:`pydantic.BaseModel` A member who came without signing up. ``character``/``class``/``role`` are required for raid/dungeon events. .. py:attribute:: character :type: str | None .. py:attribute:: member_id :type: int .. py:attribute:: model_config .. py:attribute:: role :type: sidequest_common.schemas.events.SignupRole | None :value: None .. py:attribute:: wow_class :type: sidequest_common.schemas.events.WowClass | None