Botmetrics uses Postgres as its main data store and here are the different models that it uses:
- User: A User is a Devise backed model that deals with user authentication.
- BotCollaborator: BotCollaborator is a join table used to form a relationship between a Bot and a User. A user can invite other users as collaborators to view metrics on the same bot and each time that happens a new
BotCollaboratorentry is created. (A User
- Bot: A Bot is the model that backs a new "bot project" that a user might create. If you have Facebook, Slack and Kik bots, you will create three separate bots for each.
- BotInstance: A BotInstance is a model that
belongs_toa Bot. The significance of a
BotInstancevaries on the platform. For Slack, every time a new team signs up to use your bot, a new
BotInstancerecord is created. On Facebook and Kik, only a single
BotInstanceexists per bot.
- BotUser: A BotUser is a model that
belongs_toa BotInstance. A BotUser represents all of the users that interact with your bot on that platform.
- Event: An Event is a model that
belongs_toboth BotInstance and BotUser. An event represents a "metric" on Botmetrics. Every time a message is sent to/from the bot (or in the case of Slack, a message that is being transmitted in a channel that the bot has access to), or an image upload, etc. is tracked in the
- Dashboard: A Dashboard is a model that
belongs_toa Bot. A dashboard is created every time a user creates a custom dashboard to track a custom metric.
- DashboardEvent: A DashboardEvent acts a join model between
Event. Whenever a new event is created, if it matches the conditions of the custom dashboard, a
DashboardEvententry will be created to store the relationship between the Dashboard and the Event. (A Dashboard
Updated less than a minute ago