debian-mirror-gitlab/app/models/container_registry/data_repair_detail.rb
2023-07-09 08:55:56 +05:30

16 lines
436 B
Ruby

# frozen_string_literal: true
module ContainerRegistry
class DataRepairDetail < ApplicationRecord
include EachBatch
self.table_name = 'container_registry_data_repair_details'
self.primary_key = :project_id
belongs_to :project, optional: false
enum status: { ongoing: 0, completed: 1, failed: 2 }
scope :ongoing_since, ->(threshold) { where(status: :ongoing).where('updated_at < ?', threshold) }
end
end