Version 1

2025-10-20 14:53:44


Data Dictionary: 2025-10-20 14:53:44

activities_activity

Durable reference to an activity. An activity represents the problem or action that our customers need to get done. It can have many templates associated with it that are filled out to achieve this. It is the interface for permissions and visibility. This has a 1-to-1 correspondence to a form template. Each new activity will have a form template to be it's stand in for the foreign key references our system uses against FormTemplate.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEYIdentifier
namemediumtextNOName of activity, automatically created from form template name.
date_createddatetimeYESDate activity was created.
date_modifieddatetimeYESMost recent modification date (defaults to created date).
is_activetinyint(1)NOIs the form active (1) or archived (0).
is_securetinyint(1)NOIs the checkbox “Make this form private” selected in permission on form’s configure tab.
company_idintNOFOREIGN KEYusers_company(id)What company is the user associated with.
created_user_idintNOFOREIGN KEYauth_user(id)Who created the activity record.
form_template_idintNOFOREIGN KEYforms_formtemplate(id)What form template is associated with this activity.
template_category_idintNOFOREIGN KEYforms_formtemplatecategory(id)Default is uncategorized, associates an activity with a template category.
permit_brandwide_submission_accesstinyint(1)NOTrue if activity permissions allow for brand wide submissions and form is configured to allow users to view submission data from all franchisees.

activities_activityfield

Store what fields are used on what activities' templates. As fields are removed from an activity template they are marked as inactive on here.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
is_activetinyint(1)NOIs the activity active (1) or archived (0)
activity_idint unsignedNOFOREIGN KEY, UNIQUEactivities_activity(id)What is the activity id associated with this activity field. Unique_together with field_id.
field_idint unsignedNOFOREIGN KEY, UNIQUEfields_field(id)What is the field id associated with this activity field. Unique_together with activity_id.

activities_activitytemplate

An activity template represents one set of questions and fields that are filled out to help complete or answer an activity. Saved changes to the form builder result in an update to the activity template and the new version upgraded to the primary activity template.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEYIdentifier (saved changes to the builder results in an update to the activity template and the new version being upgraded to the primary activity template).
namemediumtextNOComes from the name of the form.
date_createddatetimeYESWhen was the activity template created.
date_modifieddatetimeYESWhen was the activity template last modified.
is_activetinyint(1)NOIf this has been deleted, then is_active is set to False.
is_primarytinyint(1)NOIs this the primary version that is in use now – most recent version desired to be filled out by customers.
datajsonNOjson of all fields including how fields should be shown and how they interact with each other.
activity_idint unsignedNOFOREIGN KEYactivities_activity(id)The activity is associated with this template.

activities_locationfieldorder

Admins can enable custom question ordering for forms on the web app. When this feature is active and a location is selected, a user can rearrange the questions on that form. This ordering is stored in this table. On mobile, if custom ordering is enabled and a location is pre-selected, the app fetches the latest field order from this table. Note: Users cannot change the question order on private forms, regardless of admin settings.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_createddatetimeYESDate it was created.
date_modifieddatetimeYESDate it was last modified.
field_orderjsonNOjson with the order of the fields. List of activity field ids.
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)
modified_user_idintNOFOREIGN KEYauth_user(id)
activity_template_idint unsignedNOFOREIGN KEY, UNIQUEactivities_activitytemplate(id)

activities_sharedactivity

Keeps track of the shared activity between one company and another, along with some extra information relevant to sharing.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_createddatetimeYESDate it was created.
date_modifieddatetimeYESDate it was last modified.
date_copieddatetimeYESDate it was copied.
copying_user_idintNOFOREIGN KEYauth_user(id)Who shared the form.
source_activity_idint unsignedNOFOREIGN KEY, UNIQUEactivities_activity(id)What is the activity id associated with the original activity. Unique_together with target_company_id.
target_activity_idint unsignedNOFOREIGN KEYactivities_activity(id)What is the id associated with the newly created activity.
target_company_idintYESFOREIGN KEY, UNIQUEusers_company(id)What is the id of the company the activity was shared with. Unique_together with source_activity_id.

activity_submissions

Information for each unique submission. Contains submission date information as well as field inputs.

Column

Type

Description

_id

ObjectId(String)

The Mongo id of the object

activity_template

{"id": "int"}

Id of the associated activities_activity

answers

{ "id as string": { "field_version": { "id": int }, "value": "", "visible": true } }

An response to each field on the form. Field versions are updated when a field is changed on a form, but submissions are not updated to match. The value is the answer that was entered. It can be different types based on the field. The key is a reference to fields_field id associated to the answer.

smetadata

yamlcreated_by: # Submitting user
    id: int # Id of the submitting user
    display_name: 'First Last'

company:
    id: int

user_role: # Submitting user's role
    id: int
    name: 'Example Role'

distribute_groups: # List of associated teams
    - id: int

user_distribute_groups: # List of associated user teams
    [] # Empty list

account_distribute_groups: # List of associated locations
    [] # Empty list

time_zone: 'America/New_York' # Submitted time zone
client_time_zone: 'Pacific/Rarotonga' # Location's time zone

user_agent: 'string' # Info about the submitting device
platform: 'unknown' # web, ios, android, etc
guid: 'string' # A GUID for the submission
environment: 'web' # web, app, etc

date_created: !!str ISODate("date string") # Server time
date_completed: !!str ISODate("date string")
date_submitted: !!str ISODate("date string")
date_modified: !!str ISODate("date string")
date_created_local: !!str ISODate("date string") # Device time
date_completed_local: !!str ISODate("date string")
date_submitted_local: !!str ISODate("date string")

time_to_complete: int # ms from start to completion
distance_to_account: null # distance from location to submission
lat: null # latitude of submission
lon: null # longitude of submission

task:
    id: int # Id of the task
    title: 'Example title'
    account_id: int # Location id

project:
    id: int
    title: 'Example Project Name'

account: # Location
    id: int
    name: 'Example location name'
    tags: # List of location attributes
        - id: int
          name: 'example attribute'

Metadata properties of the submission. Contains useful data that is not actually part of the submission form answers.

legacy_submission_id

String

Used to associate a submission to a form_submission.

deleted

Boolean

Indicates if the submission has been deleted.

announcements_announcement

The table that lists announcements.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
titlemediumtextYES
messagemediumtextYES
date_createddatetimeYES
date_modifieddatetimeYES
company_idintNOFOREIGN KEYusers_company(id)
created_user_idintNOFOREIGN KEYauth_user(id)
attachmentsjsonYES
date_scheduleddatetimeYES
is_activetinyint(1)NO
is_editabletinyint(1)NOIs this announcement editable, true only while the announcement is not yet live.
queue_item_idint unsignedYESFOREIGN KEYschedules_queue(id)
location_attributesjsonYES
scopevarchar(255)NOBrand or Company

announcements_announcement_teams

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
announcement_idint unsignedNOFOREIGN KEY, UNIQUEannouncements_announcement(id)
team_idintNOFOREIGN KEY, UNIQUEusers_team(id)

announcements_announcement_user_roles

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
announcement_idint unsignedNOFOREIGN KEY, UNIQUEannouncements_announcement(id)
userrole_idintNOFOREIGN KEY, UNIQUEusers_userrole(id)

announcements_announcement_users

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
announcement_idint unsignedNOFOREIGN KEY, UNIQUEannouncements_announcement(id)
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)

announcements_bannerannouncement

Announcements which show up in the mobile banner.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
statusvarchar(50)NOOptions: Scheduled, Live, Ended, Stopped, Deleted
date_enddatetimeNO
date_stoppeddatetimeYES
announcement_idint unsignedNOFOREIGN KEY, UNIQUEannouncements_announcement(id)
stopped_user_idintYESFOREIGN KEYauth_user(id)

auth_group

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(150)NOUNIQUE

auth_user

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
last_logindatetimeYES
usernamevarchar(150)NOUNIQUE
first_namevarchar(150)NO
last_namevarchar(150)NO
emailvarchar(100)NO
is_activetinyint(1)NO
date_joineddatetimeNO

auth_user_groups

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)
group_idintNOFOREIGN KEY, UNIQUEauth_group(id)

comments_comment

Describes the list of comments. Comments can be made on submissions and tasks.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
is_activetinyint(1)NO
messagevarchar(3000)YES
created_user_idintNOFOREIGN KEYauth_user(id)
topic_idint unsignedNOFOREIGN KEYcomments_topic(id)

comments_submission

Table that connects comments and form submissions.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
is_attributetinyint(1)NO
comment_idint unsignedNOFOREIGN KEYcomments_comment(id)
submission_idchar(24)NOFOREIGN KEYforms_submission(id)Submission Id in MongoDB.

comments_task

Table that connects comments and tasks.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
is_attributetinyint(1)NO
comment_idint unsignedNOFOREIGN KEYcomments_comment(id)
task_idint unsignedNOFOREIGN KEYtasks_task(id)

comments_topic

Table that connects comments and topics. Used for connecting comments and triggers.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
trigger_subtype_idsmallint unsignedNOFOREIGN KEYrules_triggersubtype(id)
trigger_type_idtinyint unsignedNOFOREIGN KEYrules_triggertype(id)

comments_topicsubscriber

Table that connects comments and topics per user.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_last_readdatetimeNO
date_createddatetimeNO
topic_idint unsignedNOFOREIGN KEY, UNIQUEcomments_topic(id)
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)
date_subscribeddatetimeNO

comments_user

Table that connects comments and user.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
is_attributetinyint(1)NO
comment_idint unsignedNOFOREIGN KEYcomments_comment(id)
user_idintNOFOREIGN KEYauth_user(id)

companies_companyfranchisortos

Lists out users that accepted the terms of service. This is mainly used for RBI.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_accepteddatetimeNO
accepted_user_idintNOFOREIGN KEY, UNIQUEauth_user(id)
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)

companies_companyhierarchy

Hierarchical company association using nested set pattern.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
lftint unsignedNO
rgtint unsignedNO
tree_idint unsignedNOUNIQUE
levelint unsignedNO
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
parent_company_hierarchy_idintYESFOREIGN KEYcompanies_companyhierarchy(id)

dashboards_dashboard

Table that lists the dashboards.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
titlevarchar(50)NO
date_createddatetimeNO
date_modifieddatetimeNO
created_user_idintNOFOREIGN KEYauth_user(id)

dashboards_dashboardsavedsearch

Table that lists the dashboards saved search.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
ordersmallint unsignedNO
dashboard_idint unsignedNOFOREIGN KEYdashboards_dashboard(id)
saved_search_idint unsignedNOFOREIGN KEYusers_savedsearch(id)

equipment_equipment

Table that lists the equipment.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
external_keyvarchar(50)YESUNIQUE
model_namevarchar(100)NO
manufacturervarchar(100)NO
company_idintYESFOREIGN KEY, UNIQUEusers_company(id)
is_activetinyint(1)NO
created_user_idintYESFOREIGN KEYauth_user(id)
descriptionmediumtextYES

equipment_equipment_categories

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
equipment_idintNOFOREIGN KEY, UNIQUEequipment_equipment(id)
equipmentcategory_idintNOFOREIGN KEY, UNIQUEequipment_equipmentcategory(id)

equipment_equipmentcategory

Table that lists the equipment categories.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
external_keyvarchar(50)YESUNIQUE
is_activetinyint(1)NO
company_idintYESFOREIGN KEY, UNIQUEusers_company(id)
created_user_idintYESFOREIGN KEYauth_user(id)

equipment_equipmentcategory_translation

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
language_codevarchar(15)NOUNIQUE
namevarchar(100)NO
master_idintYESFOREIGN KEY, UNIQUEequipment_equipmentcategory(id)

equipment_equipmentlocation

Assignment of equipment to a location with location specific information for that piece of equipment.

ColumnTypeNullableConstraintReferencesComment
idbigintNOPRIMARY KEY
location_zonevarchar(255)YESA text description of where this equipment exists within the specific location.
identifiervarchar(255)YESA unique description to help uniquely identify this equipment instance.
equipment_idintNOFOREIGN KEYequipment_equipment(id)
location_idintNOFOREIGN KEYlocations_location(id)
external_keyvarchar(50)YESUNIQUE
is_activetinyint(1)NO
company_idintYESFOREIGN KEY, UNIQUEusers_company(id)

equipment_equipmentlocation_equipment_temperature_profiles

ColumnTypeNullableConstraintReferencesComment
idbigintNOPRIMARY KEY
equipmentlocation_idbigintNOFOREIGN KEY, UNIQUEequipment_equipmentlocation(id)
temperatureprofile_idintNOFOREIGN KEY, UNIQUEtemperature_profiles_temperatureprofile(id)

events_company

Through table for company and events.

ColumnTypeNullableConstraintReferencesComment
company_idintNOFOREIGN KEY, PRIMARY KEYusers_company(id)
event_idint unsignedNOFOREIGN KEY, PRIMARY KEYevents_event(id)

events_cooldown

Through table for cooldown sensors and events.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
cooldown_idintNOFOREIGN KEYsensors_cooldown(id)
event_idint unsignedNOFOREIGN KEYevents_event(id)

events_event

The table lists out events regarding follow-up actions.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_createddatetimeNO
messagevarchar(255)YES
datalongtextNOJSON data containing the details regarding follow up actions.
rule_idint unsignedYESFOREIGN KEYrules_rule(id)
trigger_subtype_idsmallint unsignedNOFOREIGN KEYrules_triggersubtype(id)
trigger_type_idtinyint unsignedNOFOREIGN KEYrules_triggertype(id)

events_event_action_subtypes

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
event_idint unsignedNOFOREIGN KEY, UNIQUEevents_event(id)
actionsubtype_idsmallint unsignedNOFOREIGN KEY, UNIQUErules_actionsubtype(id)

events_event_gateways

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
event_idint unsignedNOFOREIGN KEY, UNIQUEevents_event(id)
gateway_idintNOFOREIGN KEY, UNIQUEsensors_gateway(id)

events_event_sensors

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
event_idint unsignedNOFOREIGN KEY, UNIQUEevents_event(id)
sensor_idintNOFOREIGN KEY, UNIQUEsensors_sensor(id)

events_formsubmission

Through table for forms submission and events table.

ColumnTypeNullableConstraintReferencesComment
form_submission_idchar(24)NOFOREIGN KEY, PRIMARY KEYforms_submission(id)
event_idint unsignedNOFOREIGN KEY, PRIMARY KEYevents_event(id)

events_formtemplate

Through table for form templates and events.

ColumnTypeNullableConstraintReferencesComment
event_idint unsignedNOFOREIGN KEY, PRIMARY KEYevents_event(id)
form_template_idintNOFOREIGN KEY, PRIMARY KEYforms_formtemplate(id)

events_integration

Many-to-many table for integrations types and events.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
event_idint unsignedNOFOREIGN KEYevents_event(id)
integration_type_idintNOFOREIGN KEYintegrations_integrationtype(id)

events_location

Through table for locations and events.

ColumnTypeNullableConstraintReferencesComment
location_idintNOFOREIGN KEY, PRIMARY KEYlocations_location(id)
event_idint unsignedNOFOREIGN KEY, PRIMARY KEYevents_event(id)

events_notification

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
event_idint unsignedNOFOREIGN KEY, UNIQUEevents_event(id)
notification_idint unsignedYESFOREIGN KEY, UNIQUEnotifications_notification_new(id)

events_project

Many-to-many table for projects and events.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
event_idint unsignedNOFOREIGN KEYevents_event(id)
project_idint unsignedNOFOREIGN KEYprojects_project(id)

events_sensorformsubmission

Many to many table for sensor form submissions and events.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
sensor_form_submission_idchar(32)NO
event_idint unsignedNOFOREIGN KEYevents_event(id)

events_task

Through table for tasks and events.

ColumnTypeNullableConstraintReferencesComment
task_idint unsignedNOFOREIGN KEY, PRIMARY KEYtasks_task(id)
event_idint unsignedNOFOREIGN KEY, PRIMARY KEYevents_event(id)

events_team

Through table for teams and events.

ColumnTypeNullableConstraintReferencesComment
event_idint unsignedNOFOREIGN KEY, PRIMARY KEYevents_event(id)
team_idintNOFOREIGN KEY, PRIMARY KEYusers_team(id)

events_user

Through table for users and events.

ColumnTypeNullableConstraintReferencesComment
event_idint unsignedNOFOREIGN KEY, PRIMARY KEYevents_event(id)
user_idintNOFOREIGN KEY, PRIMARY KEYauth_user(id)

events_userrole

Through table for user roles and events.

ColumnTypeNullableConstraintReferencesComment
event_idint unsignedNOFOREIGN KEY, PRIMARY KEYevents_event(id)
user_role_idintNOFOREIGN KEY, PRIMARY KEYusers_userrole(id)

fbc_audit

Table of submissions where managing companies can share or not share audits with their reporting companies.

ColumnTypeNullableConstraintReferencesComment
idbigintNOPRIMARY KEY
date_submitteddatetimeNO
legacy_submission_idvarchar(25)NOUNIQUEMongo legacy id of the submission.
activity_submission_idvarchar(25)NOUNIQUEMongo id of the related activity submission.
form_template_idintNOFOREIGN KEYforms_formtemplate(id)
location_idintNOFOREIGN KEYlocations_location(id)
parent_company_hierarchy_idintNOFOREIGN KEYusers_company(id)
reporting_company_idintNOFOREIGN KEYusers_company(id)
submitted_user_idintNOFOREIGN KEYauth_user(id)

fields_field

Records fields used in forms.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_createddatetimeYES
is_activetinyint(1)NOIs the form active (1) or archived (0).
company_idintNOFOREIGN KEYusers_company(id)

fields_fieldtype

Types of form fields. Used to enforce constraint at the database level for field type options. (See fields_fieldversion for example)

ColumnTypeNullableConstraintReferencesComment
typechar(255)NOPRIMARY KEY

fields_fieldversion

Version tracking for form fields.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
titlemediumtextNO
datajsonNO
is_primarytinyint(1)NO
field_idint unsignedNOFOREIGN KEYfields_field(id)
date_createddatetimeYES
field_typechar(255)NOFOREIGN KEYfields_fieldtype(type)
company_idintNOFOREIGN KEYusers_company(id)

forms_formactivitycategory

Relational table between form templates and form categories. This is currently functioning as a 1:1 relationship.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
form_category_idintNOFOREIGN KEYforms_formcategory(id)
form_template_idintNOFOREIGN KEY, UNIQUEforms_formtemplate(id)

forms_formcategory

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
company_idintNOFOREIGN KEYusers_company(id)
is_sharabletinyint(1)NOIndicates that the category should be shared with any associated reporting companies if the associated company has reporting companies.
titlevarchar(50)NO

forms_formcategory_translation

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
language_codevarchar(15)NOUNIQUE
namevarchar(50)NO
master_idintYESFOREIGN KEY, UNIQUEforms_formcategory(id)

forms_formpermissionrole

Permissions applied to a private form based on a user’s role. This only applies if the form is currently private.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
form_template_idintNOFOREIGN KEY, UNIQUEforms_formtemplate(id)
permission_idintNOFOREIGN KEY, UNIQUEforms_permission(id)Permission id. Defaults to 1 (view own submissions).
user_role_idintNOFOREIGN KEY, UNIQUEusers_userrole(id)

forms_formteam

Permissions applied to a private form base on a user’s team. This only applies if the form is currently private.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
team_idintNOFOREIGN KEY, UNIQUEusers_team(id)
form_template_idintNOFOREIGN KEY, UNIQUEforms_formtemplate(id)
from_parent_team_idintYESFOREIGN KEY, UNIQUEusers_team(id)All child teams are granted permission as well. This indicates that permission is granted due to a parent team having permission.
permission_idintNOFOREIGN KEY, UNIQUEforms_permission(id)Permission id. Defaults to 1 (view own submissions)

forms_formpermissionuser

Private form permissions based on user id. This only applies if the form is currently private.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
form_template_idintNOFOREIGN KEY, UNIQUEforms_formtemplate(id)
permission_idintNOFOREIGN KEY, UNIQUEforms_permission(id)Permission id. Defaults to 1 (view own submissions).
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)

forms_formtemplate

The base record for form templates.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
titlevarchar(255)NO
datalongtextNOA JSON dictionary defining various form values and all the form’s fields' specifics.
date_createddatetimeYES
date_updateddatetimeYES
date_last_submitteddatetimeYES
num_submissionsintNONumber of submissions made with this form
deletedtinyint(1)NO
is_creator_locktinyint(1)NODo not allow admins in my company to edit this template.
show_in_brandhubtinyint(1)NOIndicates if the form has been included in BrandHub.
is_securetinyint(1)NOIf true a form has been configured to be private.
company_idintNOFOREIGN KEYusers_company(id)
parent_form_template_idintYESFOREIGN KEYforms_formtemplate(id)This is the source form template if the form template has been copied from one company to another such as when a brand form has been published through the brand.
rule_idint unsignedYESFOREIGN KEYrules_rule(id)Id for associated the rules_rule table. Used in managing triggers.
user_idintNOFOREIGN KEYauth_user(id)
form_template_type_idsmallint unsignedNOFOREIGN KEYforms_formtemplatetype(id)
is_fbc_audittinyint(1)NOWhether to show submissions made on this form on the FBC Audits page

forms_formtemplate_saved_searches_to_reactivate

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
formtemplate_idintNOFOREIGN KEY, UNIQUEforms_formtemplate(id)
savedsearch_idint unsignedNOFOREIGN KEY, UNIQUEusers_savedsearch(id)

forms_formtemplatetype

Form template type. Currently only user_generated, sensor, zenprint_print_job are options. This is used by saved searches.

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
namevarchar(50)NOUNIQUE

forms_permission

Private form permission levels.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(40)NO

forms_savedsearch_formtemplate

Relational table between form templates and saved searches.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
form_template_idintNOFOREIGN KEYforms_formtemplate(id)
saved_search_idint unsignedNOFOREIGN KEY, UNIQUEusers_savedsearch(id)

forms_submission

Record of form submissions.

ColumnTypeNullableConstraintReferencesComment
idchar(24)NOPRIMARY KEYId is the ObjectID in MongoDb for the submission.
is_activetinyint(1)NOIs submission deleted or not.
date_submitteddatetimeNO
latdoubleYESDevice latitude at time of hitting submit.
londoubleYESDevice longitude at time of hitting submit.
num_imagesintNO
questions_answeredintNO
time_to_completeintYESMilliseconds delta between date_created and date_completed.
distance_to_locationdoubleYESMiles between the submission lat/lon and the location lat/lon.
company_idintYESFOREIGN KEYusers_company(id)
form_template_idintNOFOREIGN KEYforms_formtemplate(id)
submitted_user_idintNOFOREIGN KEYauth_user(id)
date_submitted_localdatetimeYESLocal datetime when submitted.
time_zonevarchar(40)YESSubmission timezone.
num_failuresintYESThe number questions with acceptance_value = -1.

forms_zenprint_print_job

The contents of each print job generated by a Zenput Labels installation.

Column

Type

Description

_id

ObjectId(String)

The Mongo id of the object

fields

[]

Not used

metadata

title: '' # Not used

deleted: boolean

company:
    id: int

form_template_type: 'zenprint_print_job'

date_created: !!str ISODate("date string")

version:
    id: int

created_by:
    display_name: string
    id: int

rdbms_id: int

is_secure: boolean

is_creator_lock: boolean

is_copy_enabled: boolean

order: []

The metadata for the form template, which is how print jobs are implemented. This information only changes when the form template gets updated or when a new one is used. It contains information on: -Type of form template: zenprint_print_job -The user that created the form template. -The company that the user belongs to -When the form template was created. -The database ID for the form template.

smetadata

title: '' # Not used

deleted: boolean

company:
    id: int

form_template_type: 'zenprint_print_job'

date_created: !!str ISODate("date string")

version:
    id: int

created_by:
    display_name: string
    id: int

rdbms_id: int

is_secure: boolean

is_creator_lock: boolean

is_copy_enabled: boolean

order: []

The definition for the print job. There is one print job per ingredient, even in bulk print scenarios. This will also contain printer information for debugging purposes. The information collected varies between manufacturers (Zebra and Bixolon).

deleted

Boolean

Indicates if the print job has been deleted.

ingredients_allergenlabel

Allergens in ingredients.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
ingredient_idintNOFOREIGN KEY, UNIQUEingredients_ingredient(id)

ingredients_allergenlabel_translation

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
language_codevarchar(15)NOUNIQUE
allergen_labelvarchar(2000)NO
master_idintYESFOREIGN KEY, UNIQUEingredients_allergenlabel(id)

ingredients_catalog

Table that lists the ingredient catalogs owned by some managing companies.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(200)NO
date_createddatetimeNO
date_modifieddatetimeNO
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
is_activetinyint(1)NO

ingredients_catalogsubscription

Table that points to which ingredient catalog a reporting company is using.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
ingredient_catalog_subscriber_idintNOFOREIGN KEY, UNIQUEusers_company(id)
ingredient_catalog_idintYESFOREIGN KEYingredients_catalog(id)

ingredients_category

Table that lists ingredient categories.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
colorvarchar(6)NOHex color value for displaying the category color.
date_createddatetimeNO
date_modifieddatetimeNO
is_activetinyint(1)NO
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
created_user_idintNOFOREIGN KEYauth_user(id)
external_keyvarchar(100)YESUNIQUEKey used to link the Crunchtime value to the customer’s internal systems.
activities_supporttinyint(1)NOWhether or not this category is used by the Activities feature. If true, the category will appear in the Ingredient Catelog's drop-down menu for the Ingredient Temperature field on form
labels_supporttinyint(1)NOWhether or not this category is used by the Zenput Labels application.
production_sheets_supporttinyint(1)NOWhether or not this category is used by the Production Sheets application.

ingredients_category_translation

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
language_codevarchar(15)NOUNIQUE
namevarchar(100)NO
master_idintYESFOREIGN KEY, UNIQUEingredients_category(id)

ingredients_categorydisable

Table that lists categories that are disabled for specific companies.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
category_idintNOFOREIGN KEY, UNIQUEingredients_category(id)
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)

ingredients_companypreference

Table that contains settings per company that are specific to Zenput Labels. Currently only contains the label types that a company can order from the app.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
label_typevarchar(75)NOThe type of label to order (low-adhesive or dissolvable), Default is Low-Adhesive.
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)

ingredients_expirationdatetype

What the expiration on the printed label means (best by, expires on, use by).

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
namevarchar(20)NOUNIQUE

ingredients_expirationtype

The type of expiration that is printed on the labels. This affects how the calculation is done and how it is printed.

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
namevarchar(55)NOUNIQUEThe type of expiration: calculated, end of day, package, two step.

ingredients_ingredient

Table that lists ingredients.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
is_activetinyint(1)NO
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
created_user_idintNOFOREIGN KEYauth_user(id)
has_expirationtinyint(1)NO
template_group_idintYESFOREIGN KEYingredients_templategroup(id)
external_keyvarchar(100)YESUNIQUEKey used to link the Crunchtime value to the customer’s internal systems.
parent_idintYESFOREIGN KEYingredients_ingredient(id)Id of the same table: ingredients_ingredient Example: a regular donut is the parent ingredient of a glazed donut
activities_supporttinyint(1)NOWhether or not this ingredient is used by the Activities feature.
labels_supporttinyint(1)NOWhether or not this ingredient is used by the Zenput Labels application.
production_sheets_supporttinyint(1)NOWhether or not this ingredient is used by the Production Sheets application.

ingredients_ingredient_categories

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
ingredient_idintNOFOREIGN KEY, UNIQUEingredients_ingredient(id)
category_idintNOFOREIGN KEY, UNIQUEingredients_category(id)

ingredients_ingredient_translation

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
language_codevarchar(15)NOUNIQUE
namevarchar(100)NO
master_idintYESFOREIGN KEY, UNIQUEingredients_ingredient(id)

ingredients_ingredientclearview

Table that lists the ClearView external key for ingredients. Used only by Production Sheets for tracking waste.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
clearview_external_keyvarchar(100)NO
ingredient_idintNOFOREIGN KEY, UNIQUEingredients_ingredient(id)

ingredients_ingredientdisable

Table that lists ingredients that are disabled for specific companies.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
ingredient_idintNOFOREIGN KEY, UNIQUEingredients_ingredient(id)

ingredients_ingredientlocation

Table that lists which ingredients are available in which locations.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
ingredient_idintNOFOREIGN KEY, UNIQUEingredients_ingredient(id)
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)
default_unit_of_measure_idintYESFOREIGN KEYingredients_unitofmeasure(id)
is_activetinyint(1)NO

ingredients_ingredientlocation_ingredient_temperature_profiles

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
ingredientlocation_idintNOFOREIGN KEY, UNIQUEingredients_ingredientlocation(id)
temperatureprofile_idintNOFOREIGN KEY, UNIQUEtemperature_profiles_temperatureprofile(id)

ingredients_ingredientlocation_units_of_measure

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
ingredientlocation_idintNOFOREIGN KEY, UNIQUEingredients_ingredientlocation(id)
unitofmeasure_idintNOFOREIGN KEY, UNIQUEingredients_unitofmeasure(id)

ingredients_ingredientlocationphaseexpiration

Table that contains expiration information for ingredient locations.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
expiration_unitvarchar(11)YESDays, weeks, months, etc.
expiration_valueintYESHow many units.
is_activetinyint(1)NO
expiration_date_type_idsmallint unsignedYESFOREIGN KEYingredients_expirationdatetype(id)
expiration_type_idsmallint unsignedNOFOREIGN KEYingredients_expirationtype(id)
phase_type_idintYESFOREIGN KEY, UNIQUEingredients_phasetype(id)
ingredient_idintNOFOREIGN KEY, UNIQUEingredients_ingredient(id)
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)

ingredients_labelorder

Table that contains information on where to send ordered labels.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
label_typevarchar(75)YESThe label size (1x1, 2x1, 2x2).
quantityintYESHow many items where ordered.
addressvarchar(75)NORecipient address.
address2varchar(75)YESRecipient address 2.
cityvarchar(75)NORecipient city.
statevarchar(75)NORecipient state.
zipcodevarchar(10)NORecipient zipcode.
phonevarchar(75)NORecipient phone.
emailvarchar(75)NORecipient email.
date_createddatetimeNO
date_modifieddatetimeNO
location_idintYESFOREIGN KEYlocations_location(id)
brand_idintYESFOREIGN KEYusers_companybrand(id)
company_idintNOFOREIGN KEYusers_company(id)
country_idvarchar(2)YESFOREIGN KEYusers_country(alpha_2)The two-leter country identifier.
created_user_idintNOFOREIGN KEYauth_user(id)
mediavarchar(50)NOThe type of label (low-adhesive, dissolvable).

ingredients_phase

Table contains information on an ingredient phase.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
duration_typevarchar(11)YESDays, weeks, months, etc.
duration_valueintYESHow many units.
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
expiration_date_type_idsmallint unsignedYESFOREIGN KEYingredients_expirationdatetype(id)
expiration_type_idsmallint unsignedNOFOREIGN KEYingredients_expirationtype(id)
ingredient_idintNOFOREIGN KEY, UNIQUEingredients_ingredient(id)
phase_type_idintYESFOREIGN KEY, UNIQUEingredients_phasetype(id)
date_labelvarchar(24)YESThe name for the type of date that is printed on the label
date_createddatetimeNO
date_modifieddatetimeNO
is_activetinyint(1)NO
template_group_idintYESFOREIGN KEYingredients_templategroup(id)
duration_type_step_twovarchar(11)YESDays, weeks, months, etc., for the second step in a two-step expiration ingredient phase.
duration_value_step_twointYESHow many units for the second step in a two-step expiration phase.
step_one_namevarchar(50)YESThe name for the first step in a two-step expiration ingredient phase.
step_two_namevarchar(50)YESThe name for the second step in a two-step expiration ingredient phase.

ingredients_phaseattribute

Table that lists the [optional] phase attributes.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(50)NOUNIQUE
is_requiredtinyint(1)NO
phase_type_idintNOFOREIGN KEY, UNIQUEingredients_phasetype(id)
is_activetinyint(1)NO

ingredients_phaseattributeoption

Table that lists the phase attribute options.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(50)NOUNIQUE
phase_attribute_idintNOFOREIGN KEY, UNIQUEingredients_phaseattribute(id)
is_activetinyint(1)NO

ingredients_phaseattributeoptionsselect

Table that lists the selected attribute option.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
phase_idintNOFOREIGN KEY, UNIQUEingredients_phase(id)
phase_attribute_option_idintNOFOREIGN KEY, UNIQUEingredients_phaseattributeoption(id)

ingredients_phasetype

Table that lists the phase types (Received, Use By, etc.) Each company can have up to 5 phases.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(50)NOValue that the user sets when creating the phase.
is_activetinyint(1)NO
date_createddatetimeNO
date_modifieddatetimeNO
ordersmallint unsignedYESUNIQUEThe order in which to display this phase type.
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)Company who created the phase. Phase cannot be overwritten by a child company.
created_user_idintNOFOREIGN KEYauth_user(id)
display_namevarchar(50)NO
template_group_idintYESFOREIGN KEYingredients_templategroup(id)

ingredients_template

Table that lists the label templates for an ingredient. A tokenized ZPL template that will be formatted at printing time by the Zenput Labels app.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
datavarchar(1024)NOThe ZPL for the template. This includes tokens for the template fields.
date_createddatetimeNO
date_modifieddatetimeNO
is_activetinyint(1)NO
sizevarchar(64)NOUNIQUEThe label size for the template (1x1, 2x1, 2x2).
template_group_idintNOFOREIGN KEY, UNIQUEingredients_templategroup(id)

ingredients_templatefield

Table that lists the label template fields. A field that represents a token in a template.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
descriptionvarchar(1024)NOThe ZPL for the template. This includes tokens for the template fields.
line_breakintYESSize of line break.
namevarchar(128)NOUNIQUE
one_line_zplvarchar(512)YESThe ZPL for when only one line will be printed.
tokenvarchar(128)YESThe token in the template that will be replaced by the contents of this field.
truncate_lengthintYESString length at which the content of the field should be broken.
two_line_zplvarchar(512)YESThe ZPL for when we need to print two lines.
field_typeintNOFOREIGN KEYingredients_templatefieldtype(id)
break_twicetinyint(1)NO

ingredients_templatefield_templates

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
templatefield_idintNOFOREIGN KEY, UNIQUEingredients_templatefield(id)
template_idintNOFOREIGN KEY, UNIQUEingredients_template(id)

ingredients_templatefieldtype

Table that lists the types of template fields. The template field's type: client_determined, phase_type, phase_type_attribute

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
descriptionvarchar(1024)NO
namevarchar(128)NOUNIQUE

ingredients_templategroup

Table that lists the template groups (Name Prominent, Date Prominent, etc.) used for printing labels.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
descriptionvarchar(1024)NO
namevarchar(128)NOUNIQUE
is_activetinyint(1)NO

ingredients_templategroup_companies

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
templategroup_idintNOFOREIGN KEY, UNIQUEingredients_templategroup(id)
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)

ingredients_templategroupphasetypeoverride

Table that has the template group override at the phase type level for a catalog subscriber.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
ingredient_catalog_subscriber_idintNOFOREIGN KEY, UNIQUEusers_company(id)
phase_type_idintNOFOREIGN KEY, UNIQUEingredients_phasetype(id)
template_group_idintNOFOREIGN KEYingredients_templategroup(id)

ingredients_unitofmeasure

Table that lists the units of measure for an ingredient.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
external_keyvarchar(50)NOKey used to link the Crunchtime value to the customer’s internal systems.
is_activetinyint(1)NO
company_idintNOFOREIGN KEYusers_company(id)

ingredients_unitofmeasure_translation

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
language_codevarchar(15)NOUNIQUE
namevarchar(500)NO
master_idintYESFOREIGN KEY, UNIQUEingredients_unitofmeasure(id)

locations_attribute

Attributes are keywords or terms that end users can assign to a location.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(100)NOUNIQUE
is_editabletinyint(1)NODictates whether or not locations can be removed/added from this attribute.
is_activetinyint(1)NODescribes if the attribute has been deleted by a user or not.
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
external_keyvarchar(50)YESUNIQUE

locations_location

Lists all relevant information pertaining to locations.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(100)NO
addressvarchar(100)NO
cityvarchar(100)NO
statevarchar(50)NO
zipcodevarchar(40)YES
country_idvarchar(2)YESFOREIGN KEYusers_country(alpha_2)
emailvarchar(500)YES
phonevarchar(20)YES
external_keyvarchar(100)YESUNIQUE
latdoubleYES
londoubleYES
date_modifieddatetimeYES
date_createddatetimeYES
date_deactivateddatetimeYES
is_activetinyint(1)NO
full_text_searchvarchar(1000)NOAllows searching of location based on email, location name, state, country and etc.
time_zonevarchar(40)YES
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
regionvarchar(50)YES
temperature_unitvarchar(1)YES

locations_locationattribute

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)
attribute_idintNOFOREIGN KEY, UNIQUElocations_attribute(id)

locations_locationcalendardayevent

An event that occurs over a full day, relative to a single day of the week.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
day_of_weekintNOUNIQUEDay of the week(0-6), 0 = Monday, things that apply every day will have 7 entries in the DB.
calendar_event_type_idintNOFOREIGN KEY, UNIQUElocations_locationcalendareventtype(id)
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)

locations_locationcalendarevent

Point in time events relative to a single day of the week. Ranges, things like shifts or dayparts are represented as two calendar events, start and stop.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
time_offset_minutesintNOTime offset minutes represents the event time relative to 00:00 at the start of the day at the location. Negative numbers means the day prior, and anything after 24*60 meaning the next day.
day_of_weekintNOUNIQUEWhat day of the week does this apply for(0-6), 0 = Monday, things that apply every day will have 7 entries in the DB.
calendar_event_type_idintNOFOREIGN KEY, UNIQUElocations_locationcalendareventtype(id)
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)

locations_locationcalendareventtype

This class represents different reference types for a locations calendar.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
keyvarchar(50)NOUNIQUE
company_idintYESFOREIGN KEY, UNIQUEusers_company(id)
is_activetinyint(1)NO

locations_locationcalendareventtype_translation

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
language_codevarchar(15)NOUNIQUE
descriptionvarchar(500)NO
master_idintYESFOREIGN KEY, UNIQUElocations_locationcalendareventtype(id)

locations_locationdisablerandomingredienttemperature

This stores if a location has disabled random ingredient temperature feature.

ColumnTypeNullableConstraintReferencesComment
location_idintNOFOREIGN KEY, PRIMARY KEYlocations_location(id)

locations_locationfbc

Table that attaches FBC users to locations.

ColumnTypeNullableConstraintReferencesComment
idbigintNOPRIMARY KEY
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)

locations_locationowneruser

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)

notifications_message

Where we store information about when a User has read an Announcement or Comment. In this table we store a separate record for each recipient of the same Announcement

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
target_typevarchar(255)NOIs this an Announcement, Task, or Submission?
date_seendatetimeYES
is_activetinyint(1)NOis_active is currently used for marking announcements as resent.
date_createddatetimeYES
date_modifieddatetimeYES
announcement_idint unsignedYESFOREIGN KEYannouncements_announcement(id)
comment_idint unsignedYESFOREIGN KEYcomments_comment(id)
created_user_idintNOFOREIGN KEYauth_user(id)
recipient_user_idintNOFOREIGN KEYauth_user(id)

notifications_notifier

Who the notification is notifying.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
notification_typevarchar(50)NOInternal OR external.
emailvarchar(75)YES
delivery_type_idsmallint unsignedNOFOREIGN KEYusers_usernotificationsettingdeliverytype(id)
notification_idint unsignedNOFOREIGN KEYnotifications_notification_new(id)
user_idintYESFOREIGN KEYauth_user(id)Who is it getting sent to, if anyone.

production_sheets_sheet

A production sheet record represents a production sheet for a specific timeframe in a location. There is only one production sheet per day per location.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
approved_local_usernamevarchar(20)YES
datedateNOUNIQUEWhat date is the sheet for.
date_approveddatetimeYES
date_createddatetimeNO
date_modifieddatetimeNO
is_activetinyint(1)NO
modified_local_usernamevarchar(20)NO
approved_user_idintYESFOREIGN KEYauth_user(id)
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)
modified_user_idintNOFOREIGN KEYauth_user(id)

production_sheets_sheetentry

A single record that stores how much of an ingredient was made or wasted and optionally its temperature as well. The slice of time that any entry represents is an hour, which is represented by how many minutes have passed since the start date of a production sheet at 00:00 to mark the start of the slice.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
amount_madedoubleYES
amount_wasteddoubleYES
modified_local_usernamevarchar(20)NO
date_createddatetimeNO
entry_time_offset_startintNOHow many minutes away it is from the production sheet's date at 00:00. It could be negative if needed.
temperaturedoubleYES
typeint unsignedNO1 = Regular, 2 = Special Count.
modified_user_idintNOFOREIGN KEYauth_user(id)
sheet_ingredient_idintNOFOREIGN KEYproduction_sheets_sheetingredient(id)
date_modified_localdatetimeNO
date_modifieddatetimeNO
parent_entry_idintYESFOREIGN KEYproduction_sheets_sheetentry(id)Id of the same table.

production_sheets_sheetingredient

Represents an ingredient row in a production sheet. The same ingredient can't be associated twice to the same production sheet. When a new production sheet gets created via a POST call, sheet templates that are applicable for that day will end up being copied over into sheet ingredients.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
modified_local_usernamevarchar(20)NO
recommended_amount_to_makedoubleYES
modified_user_idintNOFOREIGN KEYauth_user(id)
parent_sheet_ingredient_idintYESFOREIGN KEYproduction_sheets_sheetingredient(id)
sheet_idintNOFOREIGN KEY, UNIQUEproduction_sheets_sheet(id)
unit_of_measure_idintNOFOREIGN KEYingredients_unitofmeasure(id)
expiration_unitvarchar(11)YES
expiration_valueintYES
ingredient_idintNOFOREIGN KEY, UNIQUEingredients_ingredient(id)

production_sheets_sheettemplate

A production sheet template ingredient. When a production sheet is created, its ingredients' units of measure and recommended makes are defined by this blueprint, which is unique per location and can create subsequent production sheet ingredients using the same template ingredient.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
day_of_weekintNOUNIQUEDay of the week(0 - 6), 0 = Monday
is_activetinyint(1)NO
modified_local_usernamevarchar(20)NO
recommended_amount_to_makedoubleYES
modified_user_idintNOFOREIGN KEYauth_user(id)
unit_of_measure_idintNOFOREIGN KEYingredients_unitofmeasure(id)
ingredient_idintNOFOREIGN KEY, UNIQUEingredients_ingredient(id)
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)

projects_crosscompanyproject

Table that lists brand-wide projects. These projects are shared to a company based on hierarchy and can be distributed based on additional criteria.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
titlevarchar(255)NO
descriptionmediumtextYES
date_createddatetimeNO
date_modifieddatetimeNO
is_activetinyint(1)NOStates whether the project is active/has not been archived.
create_tasks_datamediumtextYES
frequencyintYESYearly, Monthly, Weekly, Daily.
is_auto_archivetinyint(1)NOArchive this project, if true, when date_due has passed. Does nothing for recurring project, its ending date is handled by the recurring.
date_start_localdatetimeYESOnly included on project instance with tasks (one-off or child instance) Datetime of when the tasks should start regardless of timezone.raw sql will need to reference date_due_utc.
date_due_localdatetimeYESOnly included on project instance with tasks (one-off or child instance) Datetime of when the tasks should be due regardless of timezone.raw sql will need to reference date_due_utc.
allow_any_user_fulfilltinyint(1)NO
deletedtinyint(1)NO
date_deleteddatetimeYES
date_archiveddatetimeYES
archived_user_idintYESFOREIGN KEYauth_user(id)
company_idintNOFOREIGN KEYusers_company(id)
create_tasks_form_template_idintYESFOREIGN KEYforms_formtemplate(id)
create_tasks_reply_type_idsmallint unsignedYESFOREIGN KEYtasks_replytype(id)Task reply type is used to create bulk tasks for recurring child.
create_tasks_user_role_idintYESFOREIGN KEYusers_userrole(id)This is the user role to create bulk tasks for recurring child.
created_user_idintNOFOREIGN KEYauth_user(id)
deleted_user_idintYESFOREIGN KEYauth_user(id)
recurring_datajsonYES
create_tasks_location_attributesjsonYESHolds data for how to filter project locations based on location attributes.
create_tasks_location_calendar_eventsjsonYESStores the data to set project's tasks start and due dates using location calendar events.
project_typevarchar(255)NOThe project type, it can be Location or User.
is_propagatedtinyint(1)NO

projects_follower

Table that lists the users that are subscribed as report recipients for a specific project.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
project_idint unsignedNOFOREIGN KEY, UNIQUEprojects_project(id)
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)The user who is added to receive a report on the project.

projects_project

Table that lists projects within a single company.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
titlevarchar(255)NO
descriptionmediumtextYES
date_createddatetimeNO
date_modifieddatetimeNO
date_duedatetimeYESOnly included on project instance with tasks (one-off or child instance), the max(tasks.date_due) for tasks generated by the project.
is_activetinyint(1)NOStates whether the project is active or archived. An archived project will have is_active=0. If a project has been deleted, the project's is_active field will still be 1. is_active=1 and deleted=1 are perfectly valid in our system.
create_tasks_datamediumtextYESThis is json representation of how to create the child projects (if recurring), or how this project was created.
is_auto_archivetinyint(1)NOArchive this project, if true, when date_due has passed. Does nothing for recurring project, its ending date is handled by the recurring.
date_start_utcdatetimeYES
date_due_utcdatetimeYES
date_startdatetimeYESOnly included on project instance with tasks (one-off or child instance)Datetime of when the tasks should start regardless of timezone.raw sql will need to reference date_due_utc.
allow_any_user_fulfilltinyint(1)NO
company_idintNOFOREIGN KEYusers_company(id)
create_tasks_team_idintYESFOREIGN KEYusers_team(id)This is the team to assign created tasks to.
create_tasks_user_role_idintYESFOREIGN KEYusers_userrole(id)This is the user role to assign created tasks to.
created_user_idintNOFOREIGN KEYauth_user(id)
parent_project_idint unsignedYESFOREIGN KEYprojects_project(id)Id of the same table.
recurring_idint unsignedYESFOREIGN KEY, UNIQUEschedules_recurring(id)Link to the schedule recurring item for this project. This holds how often to create a new project.
is_future_projecttinyint(1)NOThis states that the project was setup to run in the future.
archived_user_idintYESFOREIGN KEYauth_user(id)
date_archiveddatetimeYES
date_deleteddatetimeYES
deletedtinyint(1)NOIf True then the project was deleted do not show it, report on it, etc. Unlike archived projects, deleted projects are not recoverable from the UI.
deleted_user_idintYESFOREIGN KEYauth_user(id)
create_tasks_form_template_idintYESFOREIGN KEYforms_formtemplate(id)
create_tasks_reply_type_idsmallint unsignedYESFOREIGN KEYtasks_replytype(id)Task reply type is used to create bulk tasks for recurring child.
frequencyintYES0 - YEARLY, 1 - MONTHLY, 2 - WEEKLY, 3 - DAILY
project_typevarchar(255)NOThe project type, it can be Location or User.
create_tasks_location_attributesjsonYESHolds data for how to filter project locations based on location attributes.
create_tasks_location_calendar_eventsjsonYESStores the data to set project's tasks start and due dates using location calendar events.

projects_project_create_tasks_location_attributes

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
project_idint unsignedNOFOREIGN KEY, UNIQUEprojects_project(id)
attribute_idintNOFOREIGN KEY, UNIQUElocations_attribute(id)

projects_project_create_tasks_locations

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
project_idint unsignedNOFOREIGN KEY, UNIQUEprojects_project(id)
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)

projects_project_create_tasks_users

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
project_idint unsignedNOFOREIGN KEY, UNIQUEprojects_project(id)
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)

projects_sharedproject

Many-to-many table that lists the who, what, where and when details of a shared project.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_createddatetimeYES
date_modifieddatetimeYES
date_copieddatetimeYES
copying_user_idintNOFOREIGN KEYauth_user(id)
crosscompany_project_idintNOFOREIGN KEY, UNIQUEprojects_crosscompanyproject(id)ID of the cross company project that is being shared.
target_project_idint unsignedNOFOREIGN KEYprojects_project(id)ID of the shared project.
target_company_idintYESFOREIGN KEY, UNIQUEusers_company(id)ID of the target company.

reports_savedreport

Table that lists saved reports. This will eventually replace saved search and migration from saved search to saved report is ongoing.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
titlevarchar(255)NO
is_activetinyint(1)NO
report_typevarchar(255)NOChoices are User Project Completion Recap and User Project with Failures.
configurationjsonNO
recipients_criteriajsonNO
is_brandwidetinyint(1)NO
send_to_franchiseetinyint(1)NO
use_recipient_visibilitytinyint(1)NO
date_createddatetimeYES
date_updateddatetimeYES
company_idintNOFOREIGN KEYusers_company(id)
created_user_idintNOFOREIGN KEYauth_user(id)
recurring_idint unsignedYESFOREIGN KEY, UNIQUEschedules_recurring(id)
updated_user_idintYESFOREIGN KEYauth_user(id)

rules_action

What should occur after a rule matches. Saves denormalized information about action configuration in data. This data should be normalized in the associated action tables.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
ordersmallint unsignedYESSequence of actions.
is_activetinyint(1)NO
datalongtextNO
action_subtype_idsmallint unsignedNOFOREIGN KEYrules_actionsubtype(id)
action_type_idtinyint unsignedNOFOREIGN KEYrules_actiontype(id)
rule_idint unsignedNOFOREIGN KEYrules_rule(id)

rules_actionnotificationuser

Tables that connect actions and users.

ColumnTypeNullableConstraintReferencesComment
action_idint unsignedNOFOREIGN KEY, PRIMARY KEYrules_action(id)
user_idintNOFOREIGN KEYauth_user(id)

rules_actionnotificationuserrolelocation

Tables that connect actions and user roles.

ColumnTypeNullableConstraintReferencesComment
action_idint unsignedNOFOREIGN KEY, PRIMARY KEYrules_action(id)
user_role_idintNOFOREIGN KEYusers_userrole(id)

rules_actionsubtype

Tables that list action subtypes.

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
namevarchar(50)NOUNIQUE
action_type_idtinyint unsignedNOFOREIGN KEY, UNIQUErules_actiontype(id)

rules_actiontaskassigneeuser

Tables that connect action tasks and assignee users.

ColumnTypeNullableConstraintReferencesComment
action_idint unsignedNOFOREIGN KEY, PRIMARY KEYrules_action(id)
user_idintNOFOREIGN KEYauth_user(id)

rules_actiontaskassigneeuserrole

Tables that connect action tasks and a user role id.

ColumnTypeNullableConstraintReferencesComment
action_idint unsignedNOFOREIGN KEY, PRIMARY KEYrules_action(id)
user_role_idintNOFOREIGN KEYusers_userrole(id)

rules_actiontaskdurationdue

Tables that list action tasks, duration due.

ColumnTypeNullableConstraintReferencesComment
action_idint unsignedNOFOREIGN KEY, PRIMARY KEYrules_action(id)
duration_typevarchar(6)NO
duration_valuesmallint unsignedNO

rules_actiontaskreplyformtemplate

Tables that connect action tasks replies and form templates.

ColumnTypeNullableConstraintReferencesComment
action_idint unsignedNOFOREIGN KEY, PRIMARY KEYrules_action(id)
form_template_idintNOFOREIGN KEYforms_formtemplate(id)

rules_actiontaskreplytype

Tables that connect action tasks replies and task reply types.

ColumnTypeNullableConstraintReferencesComment
action_idint unsignedNOFOREIGN KEY, PRIMARY KEYrules_action(id)
task_reply_type_idsmallint unsignedYESFOREIGN KEYtasks_replytype(id)

rules_actiontaskreporteruser

Tables that connect action tasks and report users.

ColumnTypeNullableConstraintReferencesComment
action_idint unsignedNOFOREIGN KEY, PRIMARY KEYrules_action(id)
user_idintNOFOREIGN KEYauth_user(id)

rules_actiontype

Table that lists rules action types.

ColumnTypeNullableConstraintReferencesComment
idtinyint unsignedNOPRIMARY KEY
namevarchar(50)NOUNIQUE

rules_condition

Holds a reference to the saved search in the data, not doing much. Condition_type for form submissions is always the same. Sensors has 2 other condition types. Sensor conditions can have multiple conditions. All form template conditions have order 1 (not multiple).

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
ordersmallint unsignedYES
datalongtextNOA reference to the saved search.
condition_type_idsmallint unsignedNOFOREIGN KEYrules_conditiontype(id)
rule_idint unsignedNOFOREIGN KEYrules_rule(id)

rules_conditiontype

Table that lists rules condition types.

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
namevarchar(50)NOUNIQUE

rules_formtemplate

Table that connects rules and form templates.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
form_template_idintNOFOREIGN KEY, UNIQUEforms_formtemplate(id)
rule_idint unsignedNOFOREIGN KEY, UNIQUErules_rule(id)

rules_priority

Table that lists rule priorities.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
namevarchar(55)NOUNIQUE

rules_rule

Main coordinating model for our product level triggers. When X (almost always submission creation) occurs, do Y (Action).

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
titlevarchar(255)NO
is_systemtinyint(1)NOSystem rules are not visible to end user and/or knowingly created to the user.
is_activetinyint(1)NO
date_createddatetimeNO
date_updateddatetimeNO
datalongtextNO
last_event_datetimedatetimeYES
company_idintYESFOREIGN KEYusers_company(id)
created_user_idintNOFOREIGN KEYauth_user(id)
is_enabledtinyint(1)NO

rules_rulepriority

Table that connects rules and priorities.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
priority_idint unsignedNOFOREIGN KEYrules_priority(id)
rule_idint unsignedNOFOREIGN KEYrules_rule(id)

rules_savedsearch

Table that connects rules saved search.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
condition_idint unsignedYESFOREIGN KEY, UNIQUErules_condition(id)
rule_idint unsignedNOFOREIGN KEY, UNIQUErules_rule(id)
saved_search_idint unsignedNOFOREIGN KEY, UNIQUEusers_savedsearch(id)

rules_trigger

Stores the type of triggering input or model creation that the rule runs on. This table is almost entirely submission creation.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
rule_idint unsignedNOFOREIGN KEY, UNIQUErules_rule(id)
trigger_subtype_idsmallint unsignedNOFOREIGN KEY, UNIQUErules_triggersubtype(id)
trigger_type_idtinyint unsignedNOFOREIGN KEY, UNIQUErules_triggertype(id)

rules_triggersubtype

Table that lists trigger subtypes.

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
namevarchar(50)NOUNIQUE
trigger_type_idtinyint unsignedNOFOREIGN KEY, UNIQUErules_triggertype(id)

rules_triggertype

Table that lists trigger types.

ColumnTypeNullableConstraintReferencesComment
idtinyint unsignedNOPRIMARY KEY
namevarchar(50)NOUNIQUE

sensors_cooldown

Represents the cooldown object.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
is_activetinyint(1)NO
statusvarchar(100)NOfield for the current state of the cool down process, values are: in_progress, failed, success
is_archivedtinyint(1)NO
date_modifieddatetimeYES
date_createddatetimeYES
date_starteddatetimeYES
date_endeddatetimeYES
namevarchar(100)NO
foodvarchar(100)NO
location_idintNOFOREIGN KEYlocations_location(id)
company_idintNOFOREIGN KEYusers_company(id)
created_user_idintNOFOREIGN KEYauth_user(id)
rule_idint unsignedNOFOREIGN KEYrules_rule(id)
sensor_idintNOFOREIGN KEYsensors_sensor(id)
task_idint unsignedYESFOREIGN KEY, UNIQUEtasks_task(id)

sensors_cooldownsattributee

Represents the cooldown stage.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
statusvarchar(100)YESfield for the current state of the cool down stage.
date_processeddatetimeYES
date_readingdatetimeYES
is_activetinyint(1)NO
reading_endingdoubleNO
sensor_readingdoubleYES
operator_idvarchar(100)NOLess than or less than or equal
cooldown_idintNOFOREIGN KEYsensors_cooldown(id)
reading_startingdoubleNO
seconds_from_startintNO
sattributee_identifiervarchar(100)YESInitial, middle, final.
reading_methodvarchar(100)YESField to identify the origin of the sensor reading, manual, probe, sensor.

sensors_critical_notification_setting

Class to hold sensor critical notification settings.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
delivery_type_idsmallint unsignedNOFOREIGN KEYusers_usernotificationsettingdeliverytype(id)Delivery type id, email, push, SMS, etc.
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)

sensors_devicestatus

This model is used to track the current status of a sensor or gateway and the time when its status changed the most current record represents the current state of the device.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_createddatetimeNO
is_onlinetinyint(1)NO
gateway_idintYESFOREIGN KEYsensors_gateway(id)
sensor_idintYESFOREIGN KEYsensors_sensor(id)

sensors_gateway

Represents the gateway object.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
external_keyvarchar(100)NOWhen an user registers a new sensor using the mobile app we ask for an id that usually is in a label in the device.
secondary_keyvarchar(100)NOFor Monnit sensors, the ID and SC number are saved using the fields external_key and secondary_key. These two columns together identify whether a sensor already exists in the database
namevarchar(100)NOA descriptive name for this gateway.
battery_levelintYESThe approximate battery level, [0, 100].
is_onlinetinyint(1)NO
is_activetinyint(1)NO
date_modifieddatetimeYES
date_createddatetimeYES
gateway_typevarchar(100)NOAn english product name string representing the type of gateway.
location_idintYESFOREIGN KEYlocations_location(id)
company_idintYESFOREIGN KEYusers_company(id)
created_user_idintYESFOREIGN KEYauth_user(id)
integration_idintYESFOREIGN KEYsensors_integration(id)
is_enabledtinyint(1)NO
manufacturervarchar(100)YESThe manufacturer name to use. For example: "monnit", "laird"
last_active_datedatetimeYES

sensors_gatewaybreach

Represents table gateway breach model.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_createddatetimeNO
date_updateddatetimeNO
date_closeddatetimeYES
company_idintNOFOREIGN KEYusers_company(id)
gateway_idintNOFOREIGN KEYsensors_gateway(id)
rule_idint unsignedNOFOREIGN KEYrules_rule(id)
trigger_subtype_idsmallint unsignedNOFOREIGN KEYrules_triggersubtype(id)
date_openeddatetimeNO

sensors_gatewaybreach_notifications

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
gatewaybreach_idint unsignedNOFOREIGN KEY, UNIQUEsensors_gatewaybreach(id)
notification_idint unsignedNOFOREIGN KEY, UNIQUEnotifications_notification_new(id)

sensors_gatewaybreach_tasks

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
gatewaybreach_idint unsignedNOFOREIGN KEY, UNIQUEsensors_gatewaybreach(id)
task_idint unsignedNOFOREIGN KEY, UNIQUEtasks_task(id)

sensors_integration

A single integration between a company and an integration provider.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
integration_typevarchar(50)NOTempAlert, Monnit, BluV2, The Things Industries, Senet Digi, MachineQ.
client_idvarchar(75)YES
client_secretvarchar(75)YES
is_activetinyint(1)NO
date_modifieddatetimeYES
date_createddatetimeYES
company_idintNOFOREIGN KEYusers_company(id)
client_location_idvarchar(75)YESUNIQUE

sensors_integration_locations

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
integration_idintNOFOREIGN KEY, UNIQUEsensors_integration(id)
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)

sensors_rulemetadata

Table that lists sensor rule metadata.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
is_defaulttinyint(1)NO
rule_idint unsignedNOFOREIGN KEYrules_rule(id)

sensors_sensor

Represents a single physical sensor. This sensor may be part of a larger device like with multiple reading ports on a TempAlert device.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
external_keyvarchar(100)NO
secondary_keyvarchar(100)NO
namevarchar(100)NO
is_activetinyint(1)NO
date_modifieddatetimeYES
date_createddatetimeYES
location_idintYESFOREIGN KEYlocations_location(id)
company_idintNOFOREIGN KEYusers_company(id)
integration_idintNOFOREIGN KEYsensors_integration(id)
last_reading_valuedoubleYES
last_reading_datedatetimeYES
placement_idintNOFOREIGN KEYsensors_sensorplacement(id)
batteryintYES
is_onlinetinyint(1)NO
is_enabledtinyint(1)NO
join_keyvarchar(100)NO
created_user_idintYESFOREIGN KEYauth_user(id)
manufacturervarchar(100)YES
equipment_location_idbigintYESFOREIGN KEYequipment_equipmentlocation(id)
is_configuredtinyint(1)NO

sensors_sensorbreach

This model represents a sensor breaching a trigger rule. It tracks the tasks and notifications created during a breach. A breach will be close when a sensor returns to an acceptable state which can be a normal temperature, online status or normal battery level.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_createddatetimeNO
date_updateddatetimeNO
date_closeddatetimeYES
company_idintNOFOREIGN KEYusers_company(id)
rule_idint unsignedNOFOREIGN KEYrules_rule(id)
sensor_idintNOFOREIGN KEYsensors_sensor(id)
trigger_subtype_idsmallint unsignedNOFOREIGN KEYrules_triggersubtype(id)
date_openeddatetimeNO

sensors_sensorbreach_notifications

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
sensorbreach_idint unsignedNOFOREIGN KEY, UNIQUEsensors_sensorbreach(id)
notification_idint unsignedNOFOREIGN KEY, UNIQUEnotifications_notification_new(id)

sensors_sensorbreach_tasks

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
sensorbreach_idint unsignedNOFOREIGN KEY, UNIQUEsensors_sensorbreach(id)
task_idint unsignedNOFOREIGN KEY, UNIQUEtasks_task(id)

sensors_sensorplacement

The various generalized places a sensor might be placed at a physical location.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(50)NOUNIQUEA generalized location some hardware sensor might be placed within the physical location. For example, "Walk-in Cooler"
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
date_createddatetimeYES
date_modifieddatetimeYES
uses_simulated_temperaturetinyint(1)NO

sensors_sensorplacementnickname

Nicknames that can be used by a placement to automatically name sensors.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(50)NOUNIQUEAssigning nicknames change the naming system for new sensors in this placement. Existing sensors retain their custom names set by end users.
date_modifieddatetimeYES
date_createddatetimeYES
placement_idintNOFOREIGN KEY, UNIQUEsensors_sensorplacement(id)

tasks_follower

Table that connects tasks and users.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
task_idint unsignedNOFOREIGN KEY, UNIQUEtasks_task(id)
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)

tasks_replyformtemplate

Many-to-many table that connects tasks and form_templates.

ColumnTypeNullableConstraintReferencesComment
task_idint unsignedNOFOREIGN KEY, PRIMARY KEYtasks_task(id)
form_template_idintNOFOREIGN KEYforms_formtemplate(id)

tasks_replytype

Describes the types of replies.

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
namevarchar(50)NOUNIQUEOptions: click_done, form_submission, quick.

tasks_statustype

Describes the tasks statuses.

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
namevarchar(50)NOUNIQUEIncomplete, Completed
valuevarchar(50)NOUNIQUEOpen, Closed
ordersmallint unsignedNOUNIQUEOrder of the status(1,2).

tasks_task

Describes the list of tasks. 'active_incomplete': is_active = True, is_closed = False 'archived_incomplete': is_active = False, is_closed = False 'complete': is_active = False, is_closed = True 'deleted': deleted = True, is_active = False, is_closed = False

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
titlevarchar(50)NO
descriptionmediumtextYES
date_createddatetimeNO
date_updateddatetimeYES
date_duedatetimeYES
date_submitteddatetimeYES
is_closedtinyint(1)NORepresents whether or not a task has been fulfilled.
is_activetinyint(1)NORepresents open/(closearchive). Is it available to be worked on.
datalongtextNO
latdoubleYES
londoubleYES
date_startdatetimeYESThe datetime the task should start, timezone aware.
time_zonevarchar(40)YESThe time zone that this task is setup for.
location_idintYESFOREIGN KEYlocations_location(id)
assignee_user_idintYESFOREIGN KEYauth_user(id)
company_idintNOFOREIGN KEYusers_company(id)
created_event_idint unsignedYESFOREIGN KEYevents_event(id)
created_rule_idint unsignedYESFOREIGN KEYrules_rule(id)
fulfill_submission_idchar(24)YESFOREIGN KEYforms_submission(id)
fulfill_user_idintYESFOREIGN KEYauth_user(id)
project_idint unsignedYESFOREIGN KEYprojects_project(id)
reply_type_idsmallint unsignedNOFOREIGN KEYtasks_replytype(id)
reporter_user_idintYESFOREIGN KEYauth_user(id)
source_submission_idchar(24)YESFOREIGN KEYforms_submission(id)
task_status_type_idsmallint unsignedNOFOREIGN KEYtasks_statustype(id)
date_due_localdatetimeYESLocalized datetime such that 7pm due date is the same value across all task timezones.
date_start_localdatetimeYESLocalized datetime such that 7pm due start is the same value across all task timezones.
archived_user_idintYESFOREIGN KEYauth_user(id)
date_archiveddatetimeYES
date_deleteddatetimeYES
deletedtinyint(1)NOIf True then the task was deleted do not show it, report on it, etc.
deleted_user_idintYESFOREIGN KEYauth_user(id)

temperature_profiles_temperaturecondition

Table that lists temperature conditions.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
conditionvarchar(25)NOOptions: GT_OP, GTE_OP, LT_OP, LTE_OP, BETWEEN_OP, INCLUSIVE_BETWEEN_OP.
valuejsonYESValue, example: [20, 97] Holds the values - an array of numbers. Single value for all operators but between.
acceptance_valueintNOValues: fail = -1, neutral = 0, pass = 1.
temperature_profile_idintNOFOREIGN KEYtemperature_profiles_temperatureprofile(id)

temperature_profiles_temperatureconditionfollowups

Table that lists temperature conditions follow up actions.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
temperature_condition_idintNOFOREIGN KEYtemperature_profiles_temperaturecondition(id)
is_requiredtinyint(1)NO

temperature_profiles_temperatureconditionfollowups_translation

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
language_codevarchar(15)NOUNIQUE
titlevarchar(500)NO
master_idintYESFOREIGN KEY, UNIQUEtemperature_profiles_temperatureconditionfollowups(id)

temperature_profiles_temperatureprofile

Table that lists temperature profiles.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
date_createddatetimeNO
date_modifieddatetimeNO
external_keyvarchar(50)NOUNIQUE
is_activetinyint(1)NO
typeint unsignedNOOptions: Initial heating = 1, Holding = 2.
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)

temperature_profiles_temperatureprofile_translation

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
language_codevarchar(15)NOUNIQUE
namevarchar(500)NO
master_idintYESFOREIGN KEY, UNIQUEtemperature_profiles_temperatureprofile(id)

users_company

Base company record.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(50)YES
phonevarchar(20)YES
logo_urlvarchar(100)YES
time_zonevarchar(40)YES
date_createddatetimeYES
date_modifieddatetimeYES
date_deactivateddatetimeYES
all_locations_attribute_idintYESFOREIGN KEYlocations_attribute(id)Id of the location attribute that has all locations for the company.
all_team_idintYESFOREIGN KEYusers_team(id)A system-created team that includes all user-created teams under it.
brand_idintYESFOREIGN KEYusers_companybrand(id)
industry_idintYESFOREIGN KEYusers_companyindustry(id)Id of the associated users_companyindustry.
date_formatvarchar(50)YES
distance_unitvarchar(50)YES
temperature_unitvarchar(50)YES
time_formatvarchar(50)YES

users_country

Available country codes.

ColumnTypeNullableConstraintReferencesComment
alpha_2varchar(2)NOPRIMARY KEY
namevarchar(255)NOUNIQUE
alpha_3varchar(3)NO

users_team

This table holds the different groupings of users for distributing form templates to. This table also tracks how the teams relate to each other in a hierarchy.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(60)NO
descriptionvarchar(255)NO
is_privatetinyint(1)NO
is_activetinyint(1)NO
is_editabletinyint(1)NO
parent_team_idintYESFOREIGN KEYusers_team(id)
lftint unsignedYESLeft tree level.
rgtintYESRight tree level.
external_keyvarchar(255)YESUNIQUE
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
created_user_idintYESFOREIGN KEYauth_user(id)

users_team_locations

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
team_idintNOFOREIGN KEY, UNIQUEusers_team(id)
location_idintNOFOREIGN KEY, UNIQUElocations_location(id)

users_teamuser

Many to many through table relating users_distributegroup to auth_user.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
team_idintNOFOREIGN KEY, UNIQUEusers_team(id)
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)

users_savedsearch

A saved search which can be used to create reports.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
namevarchar(255)NO
datalongtextNO
is_activetinyint(1)NO
date_createddatetimeNO
date_modifieddatetimeNO
company_idintNOFOREIGN KEYusers_company(id)
created_user_idintNOFOREIGN KEYauth_user(id)
modified_user_idintNOFOREIGN KEYauth_user(id)
recurring_idint unsignedYESFOREIGN KEYschedules_recurring(id)
rule_idint unsignedYESFOREIGN KEYrules_rule(id)
saved_search_type_idsmallint unsignedNOFOREIGN KEYusers_savedsearchtype(id)

users_savedsearchtype

The saved search type of that Zenput creates, ie. form_template_submissions.

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
titlevarchar(50)NOUNIQUE
abbreviationvarchar(5)NOUNIQUE

users_savedsearchusage

Many to many through table relating saved searches and search usage types.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
saved_search_idint unsignedNOFOREIGN KEY, UNIQUEusers_savedsearch(id)
search_usage_type_idsmallint unsignedNOFOREIGN KEY, UNIQUEusers_searchusagetype(id)

users_searchusagetype

Search usage types.

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
namevarchar(50)NO

users_sharedsavedsearch

Saved searches that are shared with reporting companies.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
date_createddatetimeYES
date_modifieddatetimeYES
date_copieddatetimeYES
copying_user_idintNOFOREIGN KEYauth_user(id)
source_saved_search_idint unsignedNOFOREIGN KEY, UNIQUEusers_savedsearch(id)
target_saved_search_idint unsignedNOFOREIGN KEYusers_savedsearch(id)
target_company_idintYESFOREIGN KEY, UNIQUEusers_company(id)

users_usernotificationsetting

Holds user notification settings.

ColumnTypeNullableConstraintReferencesComment
idint unsignedNOPRIMARY KEY
delivery_type_idsmallint unsignedNOFOREIGN KEYusers_usernotificationsettingdeliverytype(id)
trigger_subtype_idsmallint unsignedNOFOREIGN KEY, UNIQUErules_triggersubtype(id)
trigger_type_idtinyint unsignedNOFOREIGN KEY, UNIQUErules_triggertype(id)
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)

users_usernotificationsettingdeliverytype

The methods available for sending a notification to someone. Includes email, push, SMS, etc.

ColumnTypeNullableConstraintReferencesComment
idsmallint unsignedNOPRIMARY KEY
namevarchar(50)NOUNIQUE

users_userprofile

Additional user information. 1 to 1 with the users_user table.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
display_namevarchar(60)YES
date_inviteddatetimeYES
date_redeemeddatetimeYES
date_deactivateddatetimeYES
time_zonevarchar(40)NO
localevarchar(5)NOThe users preferred locale for the UI display in `ISO-639 Language Codes_ISO-3166 Country Codes', defaults en-US.
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
default_dashboard_idint unsignedYESFOREIGN KEYdashboards_dashboard(id)If set, this is the default dashboard the user will see when going to the dashboard page.
default_team_idintYESFOREIGN KEYusers_team(id)Default team for the user when displaying pages.
user_idintNOFOREIGN KEY, UNIQUEauth_user(id)
user_role_idintYESFOREIGN KEYusers_userrole(id)
external_keyvarchar(50)YESUNIQUE
temperature_unitvarchar(1)YES

users_userrole

Custom user roles.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
namevarchar(255)NOUNIQUE
is_activetinyint(1)NO
company_idintNOFOREIGN KEY, UNIQUEusers_company(id)
default_permission_idintNOFOREIGN KEYauth_group(id)

users_userrolehierarchy

Hierarchical company user roles using nested set pattern.

ColumnTypeNullableConstraintReferencesComment
idintNOPRIMARY KEY
lftint unsignedNO
rgtint unsignedNO
tree_idint unsignedNO
levelint unsignedNO
parent_idintYESFOREIGN KEYusers_userrolehierarchy(id)
user_role_idintNOFOREIGN KEY, UNIQUEusers_userrole(id)