summaryrefslogtreecommitdiff
path: root/app/models/ci/runner_project.rb
blob: 1a718d241417034d4587bf28ba3b9cc97003d797 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

module Ci
  class RunnerProject < ActiveRecord::Base
    extend Gitlab::Ci::Model

    belongs_to :runner, inverse_of: :runner_projects
    belongs_to :project, inverse_of: :runner_projects

    validates :runner_id, uniqueness: { scope: :project_id }
  end
end