StateModel.swift 592 B

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