module Photoable
  extend ActiveSupport::Concern

  included do
    has_many_attached :photos

    validates :photos, content_type: ["image/png", "image/jpeg"]
  end

  def photo
    MainPhoto.new(photos.first)
  end
end
