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

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

class DependencyProxy::ImageTtlGroupPolicy < ApplicationRecord
  self.primary_key = :group_id

  belongs_to :group

  validates :group, presence: true
  validates :enabled, inclusion: { in: [true, false] }
  validates :ttl, numericality: { greater_than: 0 }, allow_nil: true
end