BigW Consortium Gitlab

runner_project.rb 494 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# == Schema Information
#
# Table name: runner_projects
#
#  id         :integer          not null, primary key
#  runner_id  :integer          not null
#  project_id :integer          not null
#  created_at :datetime
#  updated_at :datetime
#

module Ci
  class RunnerProject < ActiveRecord::Base
    extend Ci::Model
    
    belongs_to :runner, class_name: 'Ci::Runner'
    belongs_to :project, class_name: 'Ci::Project'

    validates_uniqueness_of :runner_id, scope: :project_id
  end
end