LanguageModel.swift 756 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // LanguageModel.swift
  3. // Learn Genie
  4. //
  5. // Created by Suraj Kumar Mandal on 02/09/21.
  6. //
  7. import Foundation
  8. import RealmSwift
  9. class LanguageModel: Object {
  10. @objc dynamic var id = 0
  11. @objc dynamic var shortName = ""
  12. @objc dynamic var dateCreated = ""
  13. @objc dynamic var lastUpdated = ""
  14. @objc dynamic var name = ""
  15. override static func primaryKey() -> String? {
  16. return "id"
  17. }
  18. convenience init(id:Int, shortName:String, dateCreated:String, lastUpdated:String, name:String) {
  19. self.init()
  20. self.id = id
  21. self.shortName = shortName
  22. self.dateCreated = dateCreated
  23. self.lastUpdated = lastUpdated
  24. self.name = name
  25. }
  26. }