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