UserDetailsModel.swift 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // UserDetailsModel.swift
  3. // Learn Genie
  4. //
  5. // Created by Suraj Kumar Mandal on 11/09/21.
  6. //
  7. import Foundation
  8. import RealmSwift
  9. class UserDetailsModel: Object {
  10. @objc dynamic var accountExpired = 0
  11. @objc dynamic var accountLocked = 0
  12. @objc dynamic var dateCreated = ""
  13. @objc dynamic var dateOfBirth = ""
  14. @objc dynamic var districtId = 0
  15. @objc dynamic var email = ""
  16. @objc dynamic var enabled = 0
  17. @objc dynamic var gender = ""
  18. @objc dynamic var id = 0
  19. @objc dynamic var levelId = 0
  20. @objc dynamic var mobile = ""
  21. @objc dynamic var name = ""
  22. @objc dynamic var password = ""
  23. @objc dynamic var passwordExpired = 0
  24. @objc dynamic var roleId = 0
  25. @objc dynamic var stateId = 0
  26. @objc dynamic var topicId = 0
  27. @objc dynamic var username = ""
  28. @objc dynamic var appleIdentifier = ""
  29. override static func primaryKey() -> String? {
  30. return "email"
  31. }
  32. convenience init(accountExpired: Int,
  33. accountLocked :Int,
  34. dateCreated :String,
  35. dateOfBirth: String,
  36. districtId: Int,
  37. email : String,
  38. enabled : Int,
  39. gender : String,
  40. id : Int,
  41. levelId : Int,
  42. mobile : String,
  43. name : String,
  44. password : String,
  45. passwordExpired : Int,
  46. roleId : Int,
  47. stateId : Int,
  48. topicId : Int,
  49. username : String,
  50. appleIdentifier: String
  51. ) {
  52. self.init()
  53. self.accountExpired = accountExpired
  54. self.accountLocked = accountLocked
  55. self.dateCreated = dateCreated
  56. self.dateOfBirth = dateOfBirth
  57. self.districtId = districtId
  58. self.email = email
  59. self.enabled = enabled
  60. self.gender = gender
  61. self.id = id
  62. self.levelId = levelId
  63. self.mobile = mobile
  64. self.name = name
  65. self.password = password
  66. self.passwordExpired = passwordExpired
  67. self.roleId = roleId
  68. self.stateId = stateId
  69. self.topicId = topicId
  70. self.username = username
  71. self.appleIdentifier = appleIdentifier
  72. }
  73. }