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