TopicModel.swift 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // TopicModel.swift
  3. // Learn Genie
  4. //
  5. // Created by Suraj Kumar Mandal on 06/09/21.
  6. //
  7. import Foundation
  8. import RealmSwift
  9. class TopicModel: Object {
  10. @objc dynamic var id = 0
  11. @objc dynamic var levelId = 0
  12. @objc dynamic var noOfQuizQuestions = 0
  13. @objc dynamic var video = ""
  14. @objc dynamic var dateCreated = ""
  15. @objc dynamic var lastUpdated = ""
  16. @objc dynamic var name = ""
  17. @objc dynamic var questionBankId = 0
  18. @objc dynamic var content = ""
  19. @objc dynamic var languageId = 0
  20. override static func primaryKey() -> String? {
  21. return "id"
  22. }
  23. convenience init(id:Int, levelId:Int, noOfQuizQuestions:Int, video:String, dateCreated:String, lastUpdated:String, name:String, questionBankId: Int, content:String, languageId:Int) {
  24. self.init()
  25. self.id = id
  26. self.levelId = levelId
  27. self.noOfQuizQuestions = noOfQuizQuestions
  28. self.video = video
  29. self.dateCreated = dateCreated
  30. self.lastUpdated = lastUpdated
  31. self.name = name
  32. self.questionBankId = questionBankId
  33. self.content = content
  34. self.languageId = languageId
  35. }
  36. }