2019-05-02 17:17:27 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-04 17:31:48 -05:00
|
|
|
class PushSubscription < ActiveRecord::Base
|
|
|
|
belongs_to :user
|
2021-05-26 15:49:20 -05:00
|
|
|
|
|
|
|
def parsed_data
|
|
|
|
JSON.parse(data)
|
|
|
|
end
|
2018-05-04 17:31:48 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
# == Schema Information
|
|
|
|
#
|
2018-05-08 18:49:50 -05:00
|
|
|
# Table name: push_subscriptions
|
|
|
|
#
|
2021-07-05 17:14:15 -05: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 15:49:20 -05:00
|
|
|
# first_error_at :datetime
|
2018-05-04 17:31:48 -05:00
|
|
|
#
|