2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-04 18:31:48 -04:00
|
|
|
class PushSubscription < ActiveRecord::Base
|
|
|
|
belongs_to :user
|
2021-05-26 16:49:20 -04:00
|
|
|
|
|
|
|
def parsed_data
|
|
|
|
JSON.parse(data)
|
|
|
|
end
|
2018-05-04 18:31:48 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
# == Schema Information
|
|
|
|
#
|
2018-05-08 19:49:50 -04:00
|
|
|
# Table name: push_subscriptions
|
|
|
|
#
|
2021-07-05 18:14:15 -04:00
|
|
|
# id :bigint not null, primary key
|
|
|
|
# user_id :integer not null
|
|
|
|
# data :string not null
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
# error_count :integer default(0), not null
|
2021-05-26 16:49:20 -04:00
|
|
|
# first_error_at :datetime
|
2018-05-04 18:31:48 -04:00
|
|
|
#
|