class AttachmentHistory < ApplicationRecord
  include Publishable
  include Publicable

  belongs_to :attachment, foreign_key: 'attachment_id'

  def title
    filename
  end

  def downloads_count
    downloads
  end

  def quotes_count
    quotes.nil? ? 0 : quotes
  end

  def public?
    is_public == 1
  end

end