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