Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/annotation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# id :integer not null, primary key
# text :text
# type :integer default(0), not null
# type :integer default("example_answer"), not null
# created_at :datetime
# updated_at :datetime
# org_id :integer
Expand Down
2 changes: 0 additions & 2 deletions app/models/answer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
#
# Indexes
#
# fk_rails_3d5ed4418f (question_id)
# fk_rails_584be190c2 (user_id)
# fk_rails_84a6005a3e (plan_id)
# index_answers_on_plan_id (plan_id)
# index_answers_on_question_id (question_id)
#
Expand Down
28 changes: 13 additions & 15 deletions app/models/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,23 @@
#
# Table name: api_clients
#
# id :integer not null, primary key
# name :string, not null
# homepage :string
# contact_name :string
# contact_email :string, not null
# client_id :string, not null
# client_secret :string, not null
# last_access :datetime
# created_at :datetime
# updated_at :datetime
# org_id :integer
# id :integer not null, primary key
# client_secret :string not null
# contact_email :string not null
# contact_name :string
# description :string
# homepage :string
# last_access :datetime
# name :string not null
# created_at :datetime not null
# updated_at :datetime not null
# client_id :string not null
# org_id :integer
#
# Indexes
#
# index_api_clients_on_name (name)
# index_api_clients_on_name (name)
#
# Foreign Keys
#
# fk_rails_... (org_id => orgs.id)

# Object that represents an external system
class ApiClient < ApplicationRecord
Expand Down
21 changes: 10 additions & 11 deletions app/models/condition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,23 @@
#
# Table name: conditions
#
# id :integer not null, primary key
# question_id :integer
# number :integer
# action_type :integer
# option_list :text
# remove_data :text
# webhook_data :text
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# action_type :integer
# number :integer
# option_list :text
# remove_data :text
# webhook_data :text
# created_at :datetime not null
# updated_at :datetime not null
# question_id :integer
#
# Indexes
#
# index_conditions_on_question_id (question_id)
#
# Foreign Keys
#
# fk_rails_... (question_id => question.id)
#
# fk_rails_... (question_id => questions.id)
#

# Object that represents a condition of a conditional question
Expand Down
30 changes: 13 additions & 17 deletions app/models/contributor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,23 @@
#
# Table name: contributors
#
# id :integer not null, primary key
# firstname :string
# surname :string
# email :string
# phone :string
# roles :integer
# org_id :integer
# plan_id :integer
# created_at :datetime
# updated_at :datetime
# id :integer not null, primary key
# email :string
# name :string
# phone :string
# roles :integer not null
# created_at :datetime
# updated_at :datetime
# org_id :integer
# plan_id :integer not null
#
# Indexes
#
# index_contributors_on_id (id)
# index_contributors_on_email (email)
# index_contributors_on_org_id (org_id)
# index_contributors_on_email (email)
# index_contributors_on_org_id (org_id)
# index_contributors_on_plan_id (plan_id)
# index_contributors_on_roles (roles)
#
# Foreign Keys
#
# fk_rails_... (org_id => orgs.id)
# fk_rails_... (plan_id => plans.id)

# Object that represents a contributor to a plan
class Contributor < ApplicationRecord
Expand Down
2 changes: 1 addition & 1 deletion app/models/guidance_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
# id :integer not null, primary key
# name :string
# optional_subset :boolean default(FALSE), not null
# optional_subset :boolean default(TRUE), not null
# published :boolean default(FALSE), not null
# created_at :datetime not null
# updated_at :datetime not null
Expand Down
4 changes: 3 additions & 1 deletion app/models/identifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
# created_at :datetime
# updated_at :datetime
# identifiable_id :integer
# identifier_scheme_id :integer not null
# identifier_scheme_id :integer
#
# Indexes
#
# index_identifiers_on_identifiable_type_and_identifiable_id (identifiable_type,identifiable_id)
# index_identifiers_on_identifier_scheme_id_and_value (identifier_scheme_id,value)
# index_identifiers_on_scheme_and_type_and_id (identifier_scheme_id,identifiable_id,identifiable_type)
#

# Object that represents an identifier for an object
Expand Down
19 changes: 10 additions & 9 deletions app/models/identifier_scheme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
#
# Table name: identifier_schemes
#
# id :integer not null, primary key
# active :boolean
# description :string
# context :integer
# logo_url :text
# name :string
# user_landing_url :string
# created_at :datetime
# updated_at :datetime
# id :integer not null, primary key
# active :boolean
# context :integer
# description :string
# external_service :string
# identifier_prefix :text
# logo_url :text
# name :string
# created_at :datetime
# updated_at :datetime
#

# Object that represents a type of identifiaction (e.g. ORCID, ROR, etc.)
Expand Down
2 changes: 1 addition & 1 deletion app/models/license.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Table name: licenses
#
# id :bigint not null, primary key
# id :bigint(8) not null, primary key
# deprecated :boolean default(FALSE)
# identifier :string not null
# name :string not null
Expand Down
18 changes: 9 additions & 9 deletions app/models/metadata_standard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#
# Table name: metadata_standards
#
# id :bigint not null, primary key
# description :text
# locations :json
# related_entities :json
# title :string
# uri :string
# created_at :datetime not null
# updated_at :datetime not null
# rdamsc_id :string
# id :bigint(8) not null, primary key
# description :text
# locations :json
# related_entities :json
# title :string
# uri :string
# created_at :datetime not null
# updated_at :datetime not null
# rdamsc_id :string
#
class MetadataStandard < ApplicationRecord
# =============
Expand Down
2 changes: 1 addition & 1 deletion app/models/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
# id :integer not null, primary key
# body :text
# dismissable :boolean
# enabled :boolean default(TRUE)
# expires_at :date
# level :integer
# notification_type :integer
# starts_at :date
# title :string
# enabled :boolean
# created_at :datetime not null
# updated_at :datetime not null
#
Expand Down
49 changes: 28 additions & 21 deletions app/models/org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,38 @@
#
# Table name: orgs
#
# id :integer not null, primary key
# abbreviation :string
# contact_email :string
# contact_name :string
# feedback_msg :text
# feedback_enabled :boolean default(FALSE)
# is_other :boolean default(FALSE), not null
# links :text
# logo_name :string
# logo_uid :string
# managed :boolean default(FALSE), not null
# name :string
# org_type :integer default(0), not null
# sort_name :string
# target_url :string
# created_at :datetime not null
# updated_at :datetime not null
# language_id :integer
# region_id :integer
# managed :boolean default(false), not null
# helpdesk_email :string
# id :integer not null, primary key
# abbreviation :string
# banner_name :string
# banner_uid :string
# contact_email :string
# contact_name :string
# display_in_registration :boolean
# feedback_enabled :boolean default(FALSE)
# feedback_msg :text
# helpdesk_email :string
# is_other :boolean default(FALSE), not null
# links :text
# logo_name :string
# logo_uid :string
# managed :boolean default(FALSE), not null
# name :string
# org_type :integer default(0), not null
# target_url :string
# created_at :datetime not null
# updated_at :datetime not null
# language_id :integer
# region_id :integer
#
# Indexes
#
# fk_rails_5640112cab (language_id)
# fk_rails_5a6adf6bab (region_id)
#
# Foreign Keys
#
# fk_rails_... (language_id => languages.id)
# fk_rails_... (region_id => regions.id)
#

# Object that represents an Organization/Institution/Funder
Expand Down
50 changes: 26 additions & 24 deletions app/models/plan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,39 @@
#
# Table name: plans
#
# id :integer not null, primary key
# complete :boolean default(FALSE)
# description :text
# feedback_requested :boolean default(FALSE)
# identifier :string
# title :string
# visibility :integer default(3), not null
# created_at :datetime
# updated_at :datetime
# template_id :integer
# org_id :integer
# funder_id :integer
# grant_id :integer
# research_domain_id :bigint
# funding_status :integer
# ethical_issues :boolean
# ethical_issues_description :text
# ethical_issues_report :string
# id :integer not null, primary key
# complete :boolean default(FALSE)
# description :text
# end_date :datetime
# ethical_issues :boolean
# ethical_issues_description :text
# ethical_issues_report :string
# feedback_requested :boolean default(FALSE)
# funding_status :integer
# identifier :string
# start_date :datetime
# title :string
# visibility :integer default("privately_visible"), not null
# created_at :datetime
# updated_at :datetime
# funder_id :integer
# grant_id :integer
# org_id :integer
# research_domain_id :bigint(8)
# template_id :integer
#
# Indexes
#
# index_plans_on_template_id (template_id)
# index_plans_on_funder_id (funder_id)
# index_plans_on_grant_id (grant_id)
# index_plans_on_api_client_id (api_client_id)
# index_plans_on_funder_id (funder_id)
# index_plans_on_grant_id (grant_id)
# index_plans_on_org_id (org_id)
# index_plans_on_research_domain_id (research_domain_id)
# index_plans_on_template_id (template_id)
#
# Foreign Keys
#
# fk_rails_... (template_id => templates.id)
# fk_rails_... (org_id => orgs.id)
# fk_rails_... (research_domain_id => research_domains.id)
# fk_rails_... (template_id => templates.id)
#

# Object that represents an DMP
Expand Down
2 changes: 1 addition & 1 deletion app/models/question_format.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# id :integer not null, primary key
# description :text
# formattype :integer default(0)
# formattype :integer default("textarea")
# option_based :boolean default(FALSE)
# title :string
# created_at :datetime not null
Expand Down
18 changes: 10 additions & 8 deletions app/models/question_option.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
#
# Table name: question_options
#
# id :integer not null, primary key
# is_default :boolean
# number :integer
# text :string
# created_at :datetime
# updated_at :datetime
# question_id :integer
# id :integer not null, primary key
# is_default :boolean
# number :integer
# text :string
# created_at :datetime
# updated_at :datetime
# question_id :integer
# versionable_id :string(36)
#
# Indexes
#
# index_question_options_on_question_id (question_id)
# index_question_options_on_question_id (question_id)
# index_question_options_on_versionable_id (versionable_id)
#
# Foreign Keys
#
Expand Down
Loading