gitlab-org--gitlab-foss/app/models/ci/freeze_period.rb

16 lines
455 B
Ruby

# frozen_string_literal: true
module Ci
class FreezePeriod < ApplicationRecord
include StripAttribute
self.table_name = 'ci_freeze_periods'
belongs_to :project, inverse_of: :freeze_periods
strip_attributes :freeze_start, :freeze_end
validates :freeze_start, cron: true, presence: true
validates :freeze_end, cron: true, presence: true
validates :cron_timezone, cron_freeze_period_timezone: true, presence: true
end
end