2018-07-25 05:30:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-03-28 09:17:42 -04:00
|
|
|
class ProjectDeployToken < ApplicationRecord
|
2018-04-05 13:22:34 -04:00
|
|
|
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
|