2020-10-24 23:57:45 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class RawUsageData < ApplicationRecord
|
|
|
|
validates :payload, presence: true
|
|
|
|
validates :recorded_at, presence: true, uniqueness: true
|
|
|
|
|
|
|
|
def update_sent_at!
|
2021-02-22 17:27:13 +05:30
|
|
|
self.update_column(:sent_at, Time.current)
|
2020-10-24 23:57:45 +05:30
|
|
|
end
|
|
|
|
end
|