User
data class User(val userUid: String, val firstName: String, val lastName: String? = null, val email: String, val empCode: String? = null, val designation: String? = null, val prefix: String? = null, val externalLoginId: String? = null, val profilePicture: String? = null, val hourlyLaborCharge: Double? = null, val isActive: Boolean = true, val role: UserRole? = null, val contacts: List<UserContact> = emptyList(), val skills: List<UserSkillSet>?, val teams: List<Team>?, val createdAt: String, val updatedAt: String, val syncedAt: String? = null)
Domain model representing a User in the Zuper system.
Users are employees who can be assigned to jobs, manage customers, and perform various operations within the system.
Constructors
Link copied to clipboard
constructor(userUid: String, firstName: String, lastName: String? = null, email: String, empCode: String? = null, designation: String? = null, prefix: String? = null, externalLoginId: String? = null, profilePicture: String? = null, hourlyLaborCharge: Double? = null, isActive: Boolean = true, role: UserRole? = null, contacts: List<UserContact> = emptyList(), skills: List<UserSkillSet>?, teams: List<Team>?, createdAt: String, updatedAt: String, syncedAt: String? = null)
Properties
Functions
Link copied to clipboard
Get contact by type.
Link copied to clipboard
Check if user has any of the specified roles.
Link copied to clipboard
Convert User domain model to ZyncCreatedByUser. This extension function can be reused across the codebase wherever User → ZyncCreatedByUser conversion is needed.