---
config:
  layout: elk
  theme: mc
---
classDiagram
    class User {
        id: String
        email: String
        fullName: String
    }

    class TeamMember {
        id: UUID
        teamId: UUID
        userId: String
        teamHubId: UUID
        role: TeamMemberRole
        inviteStatus: TeamMemberInviteStatus
        inviteCode: UUID
    }

    class Team {
        id: UUID
        teamName: String
        ownerId: String
    }

    class TeamHub {
        id: UUID
        teamId: UUID
        hubName: String
    }

    class TeamHudDepartment {
        id: UUID
        name: String
        teamHubId: UUID
    }

    class MemberTask {
        teamMemberId: UUID
        taskId: UUID
    }

    class Task {
        id: UUID
        taskName: String
        status: TaskStatus
        priority: TaskPriority
        ownerId: UUID
    }

    class Vendor {
        id: UUID
        companyName: String
    }

    class Business {
        id: UUID
        businessName: String
    }

    User "1" -- "1" TeamMember : has
    
    Team "1" -- "*" TeamHub : contains
    Team "1" --o "1" Vendor : (ownerId)
    Team "1" --o "1" Business : (ownerId)

    TeamHub "1" -- "*" TeamHudDepartment : has
    TeamHub "1" -- "*" TeamMember : is assigned to

    TeamMember "*" -- "1" Team
    TeamMember "1" -- "*" MemberTask : has assigned

    Task "1" -- "*" MemberTask : is assigned to
    Task --o Vendor : (ownerId)
    Task --o Business : (ownerId)
    