AssessmentResultModel.swift 1014 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // AssessmentResultModel.swift
  3. // LMS
  4. //
  5. // Created by Suraj Kumar Mandal on 20/10/23.
  6. //
  7. import Foundation
  8. // MARK: - AssessmentResultModel
  9. class AssessmentResultModel: Codable {
  10. var asnId: JSONNull?
  11. var question: String?
  12. var selectedAnswers, answers: [String]?
  13. var questionType: QuestionType?
  14. var options: [String]?
  15. var optionsOne, optionsTwo: [String]?
  16. init(asnId: JSONNull?, question: String?, selectedAnswers: [String]?, answers: [String]?, questionType: QuestionType?, options: [String]?, optionsOne: [String]?, optionsTwo: [String]?) {
  17. self.asnId = asnId
  18. self.question = question
  19. self.selectedAnswers = selectedAnswers
  20. self.answers = answers
  21. self.questionType = questionType
  22. self.options = options
  23. self.optionsOne = optionsOne
  24. self.optionsTwo = optionsTwo
  25. }
  26. }
  27. enum QuestionType: String, Codable {
  28. case singleSelectMCQ = "Single select MCQ"
  29. }
  30. typealias AssessmentResult = [AssessmentResultModel]