gitlab-org--gitlab-foss/app/models/project_deploy_token.rb
2018-07-26 16:55:41 -07:00

10 lines
313 B
Ruby

# frozen_string_literal: true
class ProjectDeployToken < ActiveRecord::Base
belongs_to :project
belongs_to :deploy_token, inverse_of: :project_deploy_tokens
validates :deploy_token, presence: true
validates :project, presence: true
validates :deploy_token_id, uniqueness: { scope: [:project_id] }
end