Team

data class Team(val teamUid: String, val teamName: String, val teamColor: String? = null, val teamDescription: String? = null, val isActive: Boolean = true, val isAssignedToUser: Boolean = false, val members: List<TeamMember> = emptyList(), val createdAt: String, val updatedAt: String, val syncedAt: String? = null)

Domain model representing a Team in the Zuper system.

Teams are groups of users that can be assigned to jobs collectively and help organize work distribution and collaboration.

Constructors

Link copied to clipboard
constructor(teamUid: String, teamName: String, teamColor: String? = null, teamDescription: String? = null, isActive: Boolean = true, isAssignedToUser: Boolean = false, members: List<TeamMember> = emptyList(), createdAt: String, updatedAt: String, syncedAt: String? = null)

Properties

Link copied to clipboard

Get all active team members.

Link copied to clipboard
Link copied to clipboard
val isActive: Boolean = true
Link copied to clipboard
Link copied to clipboard

Get total member count (active members only).

Link copied to clipboard
Link copied to clipboard

Get the primary team lead (first team lead if multiple exist).

Link copied to clipboard

Get regular team members (non-leads).

Link copied to clipboard
val syncedAt: String? = null
Link copied to clipboard
val teamColor: String? = null
Link copied to clipboard
val teamDescription: String? = null
Link copied to clipboard

Get team leads (members with leadership roles).

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

Functions

Link copied to clipboard
fun getMember(userUid: String): TeamMember?

Get a specific team member by user UID.

Link copied to clipboard

Get members by role.

Link copied to clipboard
fun hasMember(userUid: String): Boolean

Check if a user is a member of this team.

Link copied to clipboard

Check if a user is a team lead.