debian-mirror-gitlab/app/models/raw_usage_data.rb
2021-02-22 17:27:13 +05:30

10 lines
246 B
Ruby

# frozen_string_literal: true
class RawUsageData < ApplicationRecord
validates :payload, presence: true
validates :recorded_at, presence: true, uniqueness: true
def update_sent_at!
self.update_column(:sent_at, Time.current)
end
end