survey/app/models/survey_answer.rb

11 lines
262 B
Ruby

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