logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

account_moderation_note.rb (643B)


  1. # frozen_string_literal: true
  2. # == Schema Information
  3. #
  4. # Table name: account_moderation_notes
  5. #
  6. # id :integer not null, primary key
  7. # content :text not null
  8. # account_id :integer not null
  9. # target_account_id :integer not null
  10. # created_at :datetime not null
  11. # updated_at :datetime not null
  12. #
  13. class AccountModerationNote < ApplicationRecord
  14. belongs_to :account
  15. belongs_to :target_account, class_name: 'Account'
  16. scope :latest, -> { reorder('created_at DESC') }
  17. validates :content, presence: true, length: { maximum: 500 }
  18. end