2020-08-17 17:09:56 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class RawUsageData < ApplicationRecord
|
|
|
|
validates :payload, presence: true
|
|
|
|
validates :recorded_at, presence: true, uniqueness: true
|
|
|
|
|
|
|
|
def update_sent_at!
|
2020-12-15 04:10:00 -05:00
|
|
|
self.update_column(:sent_at, Time.current)
|
2020-08-17 17:09:56 -04:00
|
|
|
end
|
|
|
|
end
|