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

module Ci
  class RunnerProject < ApplicationRecord
    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