DistrictModel.swift 701 B

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