@startuml
skinparam linetype ortho
skinparam ranksep 100
skinparam nodesep 100
skinparam classFontSize 25
skinparam arrowFontSize 20
skinparam objectFontSize 15
top to bottom direction

package "Aggregate UserAccount"{
entity UserAccount{
}
object UserName{
}
object Email{
}
object PhoneNumber{
}
object Photo{
}
object AccountStatus{
}

object Status{

}
}

package "Aggregate UserProfile"{
entity UserProfile{
}
object ProfileName{
}
object ProfileID{
}
}

package "Aggregate ProjectTypology"{
entity ProjectTypology{
}
object TypologyName{
}
}

package "Aggregate BusinessSector"{
entity BusinessSector{
}
object SectorName{
}
}

package "Aggregate Customer"{
entity Customer{
}
object CustomerName{
}
}

package "Aggregate Project"{
entity Project{}
object ProjectName{
}
object ProjectDescription{
}
object ProjectID{
}
object UserStoriesID{
}
object ProjectDuration{
LocalDate startDate
LocalDate endDate
}
object ProjectStatus{
}
object PlannedSprints{
}
object ProjectBudget{
}
object Resource{
}
object ResourceDuration{
LocalDate startDate
LocalDate endDate
}
object CostHour{
}
object Role{
}

object ResourceID{
}
}

package "Aggregate UserStory"{
entity UserStory{
}
object UserStoryID{
}
object UserStoryDescription{
}
object Actor{
}
object UserStoryStatus{
}
object UserStoryPriority{
}
}





package "Aggregate Sprint"{
entity Sprint{
}
object SprintID{
}
object SprintDuration{
LocalDate startDate
LocalDate endDate
}
entity SprintUserStory{
 }
 object SprintUserStoryEffort{
 }
}











UserAccount "1" ---> "*" UserProfile : requires >
UserAccount "1" -up--> "1" UserName : contains >
UserAccount "1" -up--> "1" Email : contains
UserAccount "1" -up--> "1" Status : contains >
UserAccount "1" -up--> "1" PhoneNumber : contains >
UserAccount "1" -up--> "0..1" Photo : may have >
UserAccount "1" -up--> "1" AccountStatus : includes >
UserAccount "1" -right-> Project : creates >
UserAccount "1" <- "*" Resource  : consists of <

Project "1" ---up-> "1" ProjectName : contains >
Project "1" ---up-> "1" ProjectDescription : contains >
Project "1" ---up-> "1" ProjectStatus : includes >
Project "1" ---up-> "1" ProjectID : is defined by >
Project "1" ---right-> "1" PlannedSprints : contains >
Project "1" ---up-> "1" ProjectBudget : has a >
Project "1" ---up-> "1" ProjectDuration : holds a >
Project "1" ---up-> "1" UserStoriesID : holds >
Project "1" <- "1" Resource : requires >
Project "1" ---up--> "1" ProjectTypology : requires >
Project "1" ---up--> "1" BusinessSector : requires >
Project "1" ---up--> "1" Customer : requires >
Project "1" --down--> "*" Sprint : contains >
Project "1" o-left--> "*" UserStory : aggregation <


UserProfile "1" ---> "1" ProfileName : contains >
UserProfile "1" -right-> "1" ProfileID : contains >

ProjectTypology "1" -up-> "1" TypologyName : contains >

BusinessSector "1" -up-> "1" SectorName : contains >

Customer "1" -up-> "1" CustomerName : contains >

Resource "1" -> "1" ResourceDuration : holds a >
Resource "1" -> "1" CostHour : includes >
Resource "1" --> "1" ResourceID : is defined by >
Resource "1..*" --> "1" ProjectID


Sprint "1" --> "1" SprintDuration : holds a >
Sprint "1" --> "1" SprintID : is defined by >

Sprint "1" o--- "*" SprintUserStory : aggregation <







SprintUserStory "1" -- "1" SprintUserStoryEffort : holds a >

UserStory "1" -- "1" UserStoryID : is defined by  >
UserStory "1" -- "1" UserStoryDescription : contains >
UserStory "1" -- "1" UserStoryPriority : contains >
UserStory "1" -- "*" UserStoryStatus : includes >
Actor "1" - "1" UserStory : creates >


Resource "1" o-up- "1" Role : aggregation <



Resource "*" -- "1" UserStory : creates >


SprintUserStory "1" -- "1" UserStory : Accesses

@enduml