status_trend.rb 545 B

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