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