// // UserDetailsModel.swift // LMS // // Created by Suraj Kumar Mandal on 01/09/22. // import Foundation import RealmSwift class UserDetailsModel: Object { @objc dynamic var id = 0 @objc dynamic var name = "" @objc dynamic var lastName = "" @objc dynamic var username = "" @objc dynamic var email = "" @objc dynamic var mobile = "" @objc dynamic var keycloakUserId = "" @objc dynamic var enable = true //@objc dynamic var intervantions = [0] var userType = List() override static func primaryKey() -> String? { return "id" } convenience init(id: Int, name :String, lastName :String, username: String, email: String, mobile : String, keycloakUserId : String , enable : Bool, //intervantions : Array, userType : List ) { self.init() self.id = id self.name = name self.lastName = lastName self.username = username self.email = email self.mobile = mobile self.keycloakUserId = keycloakUserId self.enable = enable //self.intervantions = intervantions self.userType = userType } } class UserType: Object { @objc dynamic var id = 0 @objc dynamic var actor = "" @objc dynamic var parentActor = "" @objc dynamic var discription = "" @objc dynamic var defaultRealmRole = "" @objc dynamic var createAccess = "" @objc dynamic var deleteAccess = "" @objc dynamic var editAccess = "" @objc dynamic var viewAccess = "" @objc dynamic var appUrl = "" override static func primaryKey() -> String? { return "id" } convenience init(id:Int, actor:String, parentActor:String, discription:String, defaultRealmRole:String, createAccess:String, deleteAccess:String, editAccess:String, viewAccess:String, appUrl:String ) { self.init() self.id = id self.actor = actor self.parentActor = parentActor self.discription = discription self.defaultRealmRole = defaultRealmRole self.createAccess = createAccess self.deleteAccess = deleteAccess self.editAccess = editAccess self.viewAccess = viewAccess self.appUrl = appUrl } }