2018-08-03 03:15:25 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-08-25 21:42:46 -04:00
|
|
|
module Ci
|
2019-03-28 09:17:42 -04:00
|
|
|
class RunnerProject < ApplicationRecord
|
2017-09-06 07:13:52 -04:00
|
|
|
extend Gitlab::Ci::Model
|
2017-03-17 19:06:11 -04:00
|
|
|
|
2018-05-28 07:07:28 -04:00
|
|
|
belongs_to :runner, inverse_of: :runner_projects
|
|
|
|
belongs_to :project, inverse_of: :runner_projects
|
2015-08-25 21:42:46 -04:00
|
|
|
|
2017-03-17 19:06:11 -04:00
|
|
|
validates :runner_id, uniqueness: { scope: :project_id }
|
2015-08-25 21:42:46 -04:00
|
|
|
end
|
|
|
|
end
|