preview_card_trend.rb 602 B

123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. # == Schema Information
  3. #
  4. # Table name: preview_card_trends
  5. #
  6. # id :bigint(8) not null, primary key
  7. # preview_card_id :bigint(8) not null
  8. # score :float default(0.0), not null
  9. # rank :integer default(0), not null
  10. # allowed :boolean default(FALSE), not null
  11. # language :string
  12. #
  13. class PreviewCardTrend < ApplicationRecord
  14. include RankedTrend
  15. belongs_to :preview_card
  16. scope :allowed, -> { where(allowed: true) }
  17. scope :not_allowed, -> { where(allowed: false) }
  18. end