Sha256: 3338d60aec387c7e93c95e0c231326a3f63dbba1222c61c88aa0972ed1c38f24

Contents?: true

Size: 501 Bytes

Versions: 1

Compression:

Stored size: 501 Bytes

Contents

module Jobshop
  class Inspection::Tuple < ApplicationRecord
    self.primary_keys = [ :organization_id, :report_id, :position ]

    belongs_to :organization
    belongs_to :report, class_name: "Jobshop::Inspection::Report", inverse_of: :tuples,
      foreign_key: [ :organization_id, :report_id ]
    has_many :results, class_name: "Jobshop::Inspection::Result", inverse_of: :tuple,
      foreign_key: [ :organization_id, :report_id, :position ]

    has_many :criteria, through: :results
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jobshop-0.0.157 app/models/jobshop/inspection/tuple.rb