class Domain::UserUserFollow < ReduxApplicationRecord
  include BelongsToWithCounterCache

  self.table_name = "domain_user_user_follows"
  self.primary_key = %i[from_id to_id]

  belongs_to_with_counter_cache :from,
                                class_name: "Domain::User",
                                counter_cache: :user_user_follows_from_count,
                                inverse_of: :user_user_follows_from

  belongs_to_with_counter_cache :to,
                                class_name: "Domain::User",
                                counter_cache: :user_user_follows_to_count,
                                inverse_of: :user_user_follows_to
end
