survey/app/models/survey_answer.rb

12 lines
356 B
Ruby

class SurveyAnswer
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Attributes::Dynamic
field :user, type: BSON::ObjectId
field :scored_points, type: Integer, :default => 0
field :individual_total, type: Array, :default => []
field :select_question, type: Array, :default => []
belongs_to :questionnaire_survey
end