Skip to content

Latest commit

 

History

History
121 lines (76 loc) · 5.05 KB

File metadata and controls

121 lines (76 loc) · 5.05 KB

Static 12 v2 Specifications

Technical Considerations

Unique Identifiers

To encourage creating modules that are truly independent, we should consider using reference tokens to associate entities rather than creating concrete foreign key constraints across modules.

  1. Hashed IDs: Give each table record an incrementing numeric ID. When associating a two entities, use a hashed ID to make the association. See following example:

User Table

id ref_token (hash of "user-{ID}")
1 E21K9jmv
2 MBj8J1Ka

Forum post

id ref_token (hash of "post-{ID}") poster_token
1 ZL5WBxNa E21K9jmv
2 MlkPax4D MBj8J1Ka
  1. Use UUIDs for all entities.

Attendance

Update Attendance

As a clan leader, I can update the status of a member's attendance for an activity.

Submit an excuse

As a clan member, I can submit an excuse when I miss a clan mandated activity.

Acknowledge an excuse

As a clan leader, I can acknowledge attendance excuses submitted from members under me.

Technical Specs

Attendance Log

Associates a user with an activity. The activity could be from the event calendar or any other source. For now, I placed the excuse logic with the attendance log. We may want to separate the excuse logic to its own entity.

Field Type Description
user_token string Reference token to a user.
activity_token string A unique identifier for an activity. Generated by the module that is hosting the activity. For example, a hashed calendar event ID. Using a token allows us to record activities that may not necessarily be from the event calendar.
user_commitment string One of null, attending, not attending.
status string One of null, attended, absent, excused.
excused_by string Reference token to a user.
excuse string A description of why the member couldn't attend.
date_excused datetime The date an excuse was created.
date_created datetime The date the attendance was recorded.
Out of scope features
  1. Collect analytics on TS activity. Visualize this information on a chart so clan members know when other members are typically online.

Calendar events

All clan activities will be managed through a central event calendar system. These activities include branch practices, Friday night meetings & operations, skirmishes, and MWR events.

Use Cases

Add an event

As a clan leader, I can create a clan event.

Edit an event

As a clan leader, I can edit an existing clan event.

Delete an event

As a clan leader, I can delete an existing clan event.

Notified of event

As a clan member, I should be notified when an event has been assigned to a group I belong to.

Technical Specs

Event

An item in the event calendar.

Field Type Description
title string The title of the event.
description string A brief, plain text, description of the event.
html_content html A detailed explanation of the event.
start_datetime datetime The date and time the event takes place.
end_datetime datetime The date and time the event ends.
groups list A list of groups the event is relevant to. Users of these groups will receive prompts to indicate if they will be attending.
is_required bool If true, the event is mandatory.
Event Recurrence

A single instance of an event. Events that repeat will contain multiple recurrences. For now, we should keep it simple and not allow recurring events. This design will make it easier to implement recurring events and imports from google or apple calendars in the future.

Field Type Description
event_id int ID of the parent event.
start_datetime datetime The date and time the event recurrence takes place.
end_datetime datetime The date and time the event recurrence ends.
Out of scope features
  • It would be interesting to create an integration for TS that listens for when a user enters a channel. Then checks if the date/time and TS channel match an existing event and updates attendance.