RoleModel.swift 551 B

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