parent
0767212284
commit
aec832e257
9 changed files with 29 additions and 97 deletions
|
@ -50,7 +50,6 @@
|
|||
# trendable :boolean
|
||||
# reviewed_at :datetime
|
||||
# requested_review_at :datetime
|
||||
# group_allow_private_message :boolean
|
||||
# searchability :integer default("direct"), not null
|
||||
# settings :jsonb
|
||||
# indexable :boolean default(FALSE), not null
|
||||
|
|
|
@ -4,15 +4,14 @@
|
|||
#
|
||||
# Table name: account_stats
|
||||
#
|
||||
# id :bigint(8) not null, primary key
|
||||
# account_id :bigint(8) not null
|
||||
# statuses_count :bigint(8) default(0), not null
|
||||
# following_count :bigint(8) default(0), not null
|
||||
# followers_count :bigint(8) default(0), not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# last_status_at :datetime
|
||||
# group_activitypub_count :integer
|
||||
# id :bigint(8) not null, primary key
|
||||
# account_id :bigint(8) not null
|
||||
# statuses_count :bigint(8) default(0), not null
|
||||
# following_count :bigint(8) default(0), not null
|
||||
# followers_count :bigint(8) default(0), not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# last_status_at :datetime
|
||||
#
|
||||
|
||||
class AccountStat < ApplicationRecord
|
||||
|
@ -34,8 +33,4 @@ class AccountStat < ApplicationRecord
|
|||
def statuses_count
|
||||
[attributes['statuses_count'], 0].max
|
||||
end
|
||||
|
||||
def group_activitypub_count
|
||||
[attributes['group_activitypub_count'] || 0, 0].max
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,8 +16,6 @@ module Account::Counters
|
|||
:following_count=,
|
||||
:followers_count,
|
||||
:followers_count=,
|
||||
:group_activitypub_count,
|
||||
:group_activitypub_count=,
|
||||
:last_status_at,
|
||||
to: :account_stat
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
# status_poll_state :integer default("optional"), not null
|
||||
# status_quote_state :integer default("optional"), not null
|
||||
# status_reply_state :integer default("optional"), not null
|
||||
# status_mention_state :integer default(0), not null
|
||||
# status_reference_state :integer default(0), not null
|
||||
# status_mention_state :integer default("optional"), not null
|
||||
# status_reference_state :integer default("optional"), not null
|
||||
# status_tag_threshold :integer default(-1), not null
|
||||
# status_media_threshold :integer default(-1), not null
|
||||
# status_poll_threshold :integer default(-1), not null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue