diaspora_federation/lib/diaspora_federation/entities/poll_participation.rb
cmrd Senya a0545c37de Allow parent entity types different than "Post"
Entities::Message requires "Conversation" at the place, for instance.
2015-12-21 14:05:42 +03:00

32 lines
958 B
Ruby

module DiasporaFederation
module Entities
# this entity represents a participation in poll, i.e. it is issued when a user votes for an answer in a poll
#
# @see Validators::PollParticipationValidator
class PollParticipation < Entity
# @!attribute [r] guid
# a random string of at least 16 chars.
# @see Validation::Rule::Guid
# @return [String] guid
property :guid
include Relayable
# @!attribute [r] diaspora_id
# The diaspora ID of the person who voted in the poll
# @see Person#diaspora_id
# @return [String] diaspora ID
property :diaspora_id, xml_name: :diaspora_handle
# @!attribute [r] poll_answer_guid
# guid of the answer selected by the user.
# @see PollAnswer#guid
# @return [String] poll answer guid
property :poll_answer_guid
def self.get_target_entity_type(*)
"Poll"
end
end
end
end