@startuml
skin rose
skinparam backgroundColor #EEEBDC

object "user1: User" as user1 {
    id = 1
    name = "Alice Smith"
    email = "alice@example.com"
}

object "user2: User" as user2 {
    id = 2
    name = "Bob Johnson"
    email = "bob@example.com"
}

object "proj_team_alpha: TaskGroup" as taskGroup1 {
    name = "Project Alpha Team"
    description = "Tasks for Project Alpha"
}

object "task_design_ui: Task" as task1 {
    id = 101
    name = "Design UI Mockups"
    visibility = Public
}

object "task_refactor_code: Task" as task2 {
    id = 102
    name = "Refactor Legacy Code"
    visibility = Private
}

object "attach_new_icon: Attachment" as attach1 {
    type = File
    description = "New icon suggestion"
    isPrivate = false
}

object "sol_ui_mockups: Solution" as sol1 {
    description = "Figma link to mockups"
    type = Url
}

object "req_add_icon: Request" as req1 {
    id = 201
    userId = 2
    attachmentId = 301
    type = Add
    message = "Proposing new icon for homepage."
    isApplied = false
    isRejected = false
}

object "access_ui_task1: Access" as access1 {
    userId = 1
    taskId = 101
    accessLevel = FullAccess
}

object "access_ui_task2: Access" as access2 {
    userId = 2
    taskId = 101
    accessLevel = View
}

object "access_refactor_task1: Access" as access3 {
    userId = 2
    taskId = 102
    accessLevel = FullAccess
}

object "memb_user1_proj: Membership" as memb1 {
    userId = 1
    taskGroupId = 1
    membershipLevel = FullAccess
}

object "memb_user2_proj: Membership" as memb2 {
    userId = 2
    taskGroupId = 1
    membershipLevel = View
}

taskGroup1 -r- memb1
taskGroup1 -u---- memb2

memb1 -u- user1
memb2 -u- user2

taskGroup1 -u-- task1

access1 -d- user1
access2 -u- user2
access3 -l- user2

access1 -l- task1
access2 -d- task1
access3 -r- task2

sol1 -u- task1
sol1 -- user1

attach1 -- req1
attach1 -l- task1

req1 -- task1
req1 -u- user2

@enduml
