1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // 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<Topics>()
- override static func primaryKey() -> String? {
- return "id"
- }
- convenience init(id:Int, dateCreated:String, lastUpdated:String, name:String, topics:List<Topics>, 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
- }
- }
|