Sha256: ae8e894b7889b9a5b7adcbfa405913952608888ce2716be54cd94fa47ae0c795

Contents?: true

Size: 1.22 KB

Versions: 8

Compression:

Stored size: 1.22 KB

Contents

module BridgeCache
  class Domain < BridgeBaseModel
    extend BridgeCache::Data::BridgeModel

    has_many :domain_children, primary_key: BridgeCache.primary_key, foreign_key: PARENT_ID, class_name: BridgeCache::Domain.name
    belongs_to :domain_parent, primary_key: BridgeCache.primary_key, foreign_key: PARENT_ID, class_name: BridgeCache::Domain.name, optional: true

    has_many :domain_ownees, primary_key: BridgeCache.primary_key, foreign_key: OWNER_ID, class_name: BridgeCache::Domain.name
    belongs_to :domain_owner, primary_key: BridgeCache.primary_key, foreign_key: OWNER_ID, class_name: BridgeCache::Domain.name, optional: true

    has_many :programs, primary_key: BridgeCache.primary_key, foreign_key: DOMAIN_ID, class_name: BridgeCache::Program.name
    has_many :course_templates, primary_key: BridgeCache.primary_key, foreign_key: DOMAIN_ID, class_name: BridgeCache::CourseTemplate.name
    has_many :custom_fields, primary_key: BridgeCache.primary_key, foreign_key: DOMAIN_ID, class_name: BridgeCache::CustomField.name
    has_many :grants, primary_key: BridgeCache.primary_key, foreign_key: DOMAIN_ID, class_name: BridgeCache::Grant.name

    belongs_to :owner, class_name: BridgeCache::User.name

    serialize :config
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bridge_cache-0.3.7 app/models/bridge_cache/domain.rb
bridge_cache-0.3.6 app/models/bridge_cache/domain.rb
bridge_cache-0.3.5 app/models/bridge_cache/domain.rb
bridge_cache-0.3.4 app/models/bridge_cache/domain.rb
bridge_cache-0.3.3 app/models/bridge_cache/domain.rb
bridge_cache-0.3.2 app/models/bridge_cache/domain.rb
bridge_cache-0.3.01 app/models/bridge_cache/domain.rb
bridge_cache-0.3.0 app/models/bridge_cache/domain.rb