2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-04-25 01:29:15 +08:00
|
|
|
require_dependency 'penalty_counts_serializer'
|
|
|
|
|
2014-09-05 13:20:39 +08:00
|
|
|
class TrustLevel3RequirementsSerializer < ApplicationSerializer
|
2018-04-25 01:29:15 +08:00
|
|
|
|
|
|
|
has_one :penalty_counts, embed: :object, serializer: PenaltyCountsSerializer
|
|
|
|
|
2014-01-24 05:40:10 +08:00
|
|
|
attributes :time_period,
|
2014-06-27 01:48:07 +08:00
|
|
|
:requirements_met,
|
2014-09-14 04:55:26 +08:00
|
|
|
:requirements_lost,
|
|
|
|
:trust_level_locked, :on_grace_period,
|
2014-01-24 05:40:10 +08:00
|
|
|
:days_visited, :min_days_visited,
|
|
|
|
:num_topics_replied_to, :min_topics_replied_to,
|
2014-06-27 01:48:07 +08:00
|
|
|
:topics_viewed, :min_topics_viewed,
|
|
|
|
:posts_read, :min_posts_read,
|
2014-07-02 01:34:48 +08:00
|
|
|
:topics_viewed_all_time, :min_topics_viewed_all_time,
|
|
|
|
:posts_read_all_time, :min_posts_read_all_time,
|
2014-06-28 00:26:03 +08:00
|
|
|
:num_flagged_posts, :max_flagged_posts,
|
2014-08-23 05:33:05 +08:00
|
|
|
:num_flagged_by_users, :max_flagged_by_users,
|
|
|
|
:num_likes_given, :min_likes_given,
|
2014-10-08 03:52:54 +08:00
|
|
|
:num_likes_received, :min_likes_received,
|
|
|
|
:num_likes_received_days, :min_likes_received_days,
|
|
|
|
:num_likes_received_users, :min_likes_received_users
|
2014-06-28 00:26:03 +08:00
|
|
|
|
2014-06-27 01:48:07 +08:00
|
|
|
def requirements_met
|
|
|
|
object.requirements_met?
|
|
|
|
end
|
2014-09-14 04:55:26 +08:00
|
|
|
|
|
|
|
def requirements_lost
|
|
|
|
object.requirements_lost?
|
|
|
|
end
|
2014-01-23 06:09:56 +08:00
|
|
|
end
|