BigW Consortium Gitlab

runner_project.rb 550 Bytes
Newer Older
1 2
# == Schema Information
#
Dmitriy Zaporozhets committed
3
# Table name: ci_runner_projects
4
#
Stan Hu committed
5 6 7 8 9 10
#  id            :integer          not null, primary key
#  runner_id     :integer          not null
#  project_id    :integer
#  created_at    :datetime
#  updated_at    :datetime
#  gl_project_id :integer
11 12 13 14 15 16 17
#

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

20
    validates_uniqueness_of :runner_id, scope: :gl_project_id
21 22
  end
end