2018-07-25 05:30:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-04-05 13:22:34 -04:00
|
|
|
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
|