|
|
|
@ -7,7 +7,6 @@ class Organisation < ApplicationRecord
|
|
|
|
|
has_many :data_protection_confirmations |
|
|
|
|
has_many :organisation_rent_periods |
|
|
|
|
has_many :owned_schemes, class_name: "Scheme", foreign_key: "owning_organisation_id", dependent: :delete_all |
|
|
|
|
has_many :managed_schemes, class_name: "Scheme", foreign_key: "managing_organisation_id" |
|
|
|
|
has_many :parent_organisation_relationships, foreign_key: :child_organisation_id, class_name: "OrganisationRelationship" |
|
|
|
|
has_many :parent_organisations, through: :parent_organisation_relationships |
|
|
|
|
has_many :child_organisation_relationships, foreign_key: :parent_organisation_id, class_name: "OrganisationRelationship" |
|
|
|
|