// // QuestionModel.swift // Learn Genie // // Created by Suraj Kumar Mandal on 15/09/21. // import Foundation import RealmSwift class QuestionModel: Object { @objc dynamic var id = 0 @objc dynamic var dateCreated = "" @objc dynamic var lastUpdated = "" @objc dynamic var content = "" @objc dynamic var questionBankId = 0 @objc dynamic var answerId = 0 var choices = List() override static func primaryKey() -> String? { return "id" } convenience init(id:Int, dateCreated:String, lastUpdated:String, content:String, questionBankId:Int, answerId:Int, choices:List) { self.init() self.id = id self.dateCreated = dateCreated self.lastUpdated = lastUpdated self.content = content self.questionBankId = questionBankId self.answerId = answerId self.choices = choices } } class Choices: Object { @objc dynamic var id = 0 override static func primaryKey() -> String? { return "id" } convenience init(id:Int) { self.init() self.id = id } }