mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-18 22:29:29 +08:00
Adds a `browser_pageview_event_scores` side table keyed by `event_id`, holding the per-heuristic contribution as six smallint columns: - `automation_ua_score` (0 or 100) - `known_asn_score` (0 or 15) - `velocity_score` (0, 10, 20, or 35) - `churn_score` (0, 10, or 20) - `rapid_nav_score` (0 or 15) - `referrer_score` (0, 5, or 10) The side table only holds rows for events that scored above zero.
23 lines
788 B
Ruby
Vendored
23 lines
788 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
class BrowserPageviewEventScore < ActiveRecord::Base
|
|
belongs_to :event, class_name: "BrowserPageviewEvent"
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: browser_pageview_event_scores
|
|
#
|
|
# id :bigint not null, primary key
|
|
# automation_ua_score :integer default(0), not null
|
|
# churn_score :integer default(0), not null
|
|
# known_asn_score :integer default(0), not null
|
|
# rapid_nav_score :integer default(0), not null
|
|
# referrer_score :integer default(0), not null
|
|
# velocity_score :integer default(0), not null
|
|
# event_id :bigint not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_browser_pageview_event_scores_on_event_id (event_id) UNIQUE
|
|
#
|