Welcome to mirror list, hosted at ThFree Co, Russian Federation.

runner_namespace.rb « ci « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6903e8a21a1d91dad10b5f4b6d2da7d7d5810fc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module Ci
  class RunnerNamespace < ApplicationRecord
    extend Gitlab::Ci::Model

    belongs_to :runner, inverse_of: :runner_namespaces, validate: true
    belongs_to :namespace, inverse_of: :runner_namespaces, class_name: '::Namespace'
    belongs_to :group, class_name: '::Group', foreign_key: :namespace_id

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