ZyncUser

data class ZyncUser(val userUid: String, val firstName: String, val lastName: String?, val email: String, val designation: String?, val empCode: String?, val prefix: String?, val externalLoginId: String?, val profilePicture: String?, val hourlyLaborCharge: Double?, val role: UserRole?, val accessRole: UserAccessRole?, val homePhoneNumber: String?, val mobilePhoneNumber: String?, val workPhoneNumber: String?, val isActive: Boolean, val isDeleted: Boolean, val createdAt: String?, val updatedAt: String?)

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?, email: String, designation: String?, empCode: String?, prefix: String?, externalLoginId: String?, profilePicture: String?, hourlyLaborCharge: Double?, role: UserRole?, accessRole: UserAccessRole?, homePhoneNumber: String?, mobilePhoneNumber: String?, workPhoneNumber: String?, isActive: Boolean, isDeleted: Boolean, createdAt: String?, updatedAt: String?)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Custom equals that ignores timestamp fields to prevent false positives when comparing users in nested objects like ZyncJobTimeLogSummary. Only meaningful user data is compared, not metadata timestamps.

Link copied to clipboard
open override fun hashCode(): Int

Custom hashCode that matches the equals implementation (must exclude the same fields that equals ignores: createdAt, updatedAt, role, accessRole)

Link copied to clipboard
fun ZyncUser.toZyncUserDetail(customFields: List<ZyncFormField> = emptyList()): ZyncUserDetail