Skip to content

2. Models

Mihail Varbanov edited this page Apr 15, 2022 · 6 revisions

Auth2

Auth2Token

Represents tokens obtained from Core BB. The native Core BB token contains access and refresh tokens, as well as their token type. The old OIDC token of Illinois app (aka UIUC token) contains id token as well. The token strings are used to authenticate the HTTP requests to other Rokwire backend services.

Auth2LoginType

Represents the supported authentication types by Core BB:

  • Anonymous
    The user is not authenticated. Used for anonymous or not authenticated yet users.

  • ApiKey
    The authentication is performed by a secret API key.

  • Email
    The user is authenticated by email login.

  • Phone, PhoneTwilio
    The user is authenticated by phone.

  • Oidc, OidcIllinois
    The user is authenticated by OIDC.

Auth2Account

Represents all data associated for a user account in Core BB. It contains:

  • Profile
    User profile data as defined in Auth2UserProfile.

  • Preferences
    User preferences as described in Auth2UserPrefs.

  • Permissions
    List of permissions for the given accountt.

  • Roles
    List of roles for the given account.

  • Groups
    List of groups for the given account.

  • Auth2Types
    List of authentication types for the given account.

Auth2UserProfile

Contains user's PII data like name, email, phone, address, birth year, or photo.

Auth2UserPrefs

Contains miscellaneous user's preferences like interests, favorites, tags, etc.

Auth2VoterPrefs

Contains user's voting data separately grouped from the other preference data.

Auth2Type

Contains user's authentication types. There can be more than a single authentication type as a single user account could have multiple linked authentication types (e.g. by OIDC, email, phone). The params field contains specific data for given authentication type.

Auth2UiucUser

Represents UIUC OIDC user data. This data comes in the 'user' param for oidcIllinois authentication type. Contains UIUC specific data like user's NetId, UIN, email or local UIUC roles.

UserRole

Describes the roles a Rokwire user could have. The currently available roles include student or stuff, alumni, parent, visitor, resident or athletics fan. The user could accept multiple roles at once like stuff, alumni and athletics fan.

Favorite

Abstract class could uniquely identify different independent types of favorites, e.g. favorite event, dining, sport event or student guide article.

Auth2Error

Represents the error data that Core BB supplies in case of error.

Explore

Explore

Abstract class that defines most common interfaces of items that appear in Explore panels. These are getters for id, title, description, image url, geographic location, etc. It has three predefined types of Explore: Event or Dining.

Event

Describes events that appear in Explore panels. It extends the Explore abstract class and implements its common interfaces.

It contains basic event data like name, description, image url, geographic location that fulfills Explore abstract interfaces. It also contains a lot of Event specific data like start/end date times, categories, target audience, tags, etc. It allows grouping recurring events by recurringFlag and recurrenceId fields.

Location

Describes geographic location in terms of latitude, longitude and floor, as well as various metadata for this location like name, description, building, address, etc.

Polls

Poll

Poll class represents Quick Poll. It contains entire data for a poll: id, question, options, settings, status, votes, etc. Poll’s data generally follows the model that comes from backend poll service.

PollSettings

PollSettings class represents settings for a poll that are a number of boolean flags for miscellaneous poll characteristics.

PollStatus

Enumerate for poll status: created, opened, closed.

PollVote

PollVote class holds votes for each option and exposes methods for user voting.

Groups

Group

Group class represents a Rokwire group. It contains first level data for a group: id, name, type, category, description, privacy, members, tags and membership application questions.

GroupPrivacy

Represents privacy status of a group. Groups can be private or public.

GroupMember

Represents group member data. It contains some PII data like identifier, name, email or photo urr. It also contains membership status that could be member or admin and pending or rejected applicant, as well as the answers provided on application.

GroupMembershipQuest

Represents a list of steps that need to get performed to apply for group membership..

GroupMembershipStep

Represents a particular step for applying for group membership. It can be linked to a set of events represented by their IDs. Not actually used.

GroupMembershipQuestion

Represents single question for a group membership application.

GroupMembershipQuestionAnswer

Represents a user's answer of group membership question.

GroupEvent

Extends the regular Explore Event by adding member's comments on that event.

GroupPost

Represents a user's post in a group. Contains subject and body and date & time, optional image, author of the post and list of replies.

GroupError

Represents an error that could arise.

GeoFence

GeoFenceRegion

This is a class that wraps data for region for monitoring. There are two types of regions: location and beacons. GeoFenceRegion holds common region data like ID, name, enabled flag. The type specific data is held in data field that varies for different types of regions.

The types set is used to group regions internally by logical type. The current logical types are described in geo_fence section from assets/assets.json. The currently defined types are stadium for geofence filter in stadium polls, voter - for voter registration regions, and “MTD” for MTD buss beacons.

GeoFenceRegionType

This is an enumeration for available region types: location and beacon.

GeoFenceLocation

Describes location region specific data - a circular region determined by its center point as latitude/longitude coordinate and radius around this center.

GeoFenceBeacon

Describes beacon region specific data - UUID and/or major and/or minor value.

Inbox

InboxMessage

Represents inbox message. Contains subject and body; optional data; topic, category and priority; sender and recipients.

InboxRecepient

Represents inbox message recipient. The recipient is identified by user id.

InboxSender

Represents inbox message sender. The sender could be a system or particular user.

InboxSenderType

Defines type of senders - system or user..

InboxSenderUser

Represents a particular user as inbox message sender. The user is identified by user id.

InboxUserInfo

Represents information for inbox user. The user is identified by user id. It also contains the GCM topics the user is member of.

Styles

UiColors

UiColors maps all brand colors used in the application.

UiFontFamilies

UiFontFamilies maps all brand font families used in the application.

UiStyles

UiStyles maps all brand text styles used in the application.