@startuml
'https://plantuml.com/sequence-diagram

skinparam linetype ortho
skinparam ranksep 35
skinparam nodesep 170

entity UserAccount{
}
object UserName{
}
object Email{
}
object PhoneNumber{
}
object Photo{
}
object AccountStatus{
}


entity UserProfile{
}
object ProfileName{
}


entity ProjectTypology{
}
object TypologyName{
}


entity BusinessSector{
}
object SectorName{
}


entity Costumer{
}
object CostumerName{
}


entity Project{
}
object ProjectName{
}
object ProjectDescription{
}
object ProjectID{
}
object ProjectDuration{
LocalDate startDate
LocalDate endDate
}
object ProjectStatus{
}
object PlannedSprints{
}
object ProjectBudget{
}


entity Resource{
}
object ResourceDuration{
LocalDate startDate
LocalDate endDate
}
object CostHour{
}

entity Sprint{
}
object SprintID{
}
object SprintDuration{
LocalDate startDate
LocalDate endDate
}


entity Role{
}
object RoleName{
String roleDescription
}

entity Report{
}
object ReportType{
String reportTypeDescription
}

entity Task{
}
object TaskName{
}
object TaskDescription{
}
object TaskDuration{
LocalDate startDate
LocalDate endDate
}
object EstimatedHours{
}
object HoursSpent{
}
object TaskType{
}
object TaskStatus{
}


entity Backlog{
}

entity UserStory{
}
object UserStoryID{
}
object UserStoryDescription{
}
object Actor{
}
object UserStoryStatus

entity SprintBacklog{
}

entity SprintUserStory{
}
object SprintUserStoryEffort{
}

entity ProjectManager{
}


UserAccount "1" -- "1" UserName : contains >
UserAccount "1" -- "1" Email : contains >
UserAccount "1" -- "1" PhoneNumber : contains >
UserAccount "1" -- "0..1" Photo : may have >
UserAccount "1" -- "1" AccountStatus : includes >

Project "1" -- "1" ProjectName : contains >
Project "1" -- "1" ProjectDescription : contains >
Project "1" -- "1" ProjectStatus : includes >
Project "1" -- "1" ProjectID : is defined by >
Project "1" -- "1" PlannedSprints : contains >
Project "1" -- "1" ProjectBudget : has a >
Project "1" -- "1" ProjectDuration : holds a >

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

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

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

Costumer "1" -- "1" CostumerName : contains >

Resource "1" -- "1" ResourceDuration : holds a >
Resource "1" -- "1" CostHour : includes >

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

Role "1" -- "1" RoleName : contains >

Report "1" -- "*" ReportType : features >

Task "1" -- "1" TaskName : contains >
Task "1" -- "1" TaskDescription : contains >
Task "1" -- "1" TaskDuration : holds a >
Task "1" -- "1" EstimatedHours : includes >
Task "1" -- "1" HoursSpent : includes >
Task "1" -- "*" TaskType : features >
Task "1" -- "*" TaskStatus : includes >

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

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



UserAccount "1" -- "*" UserProfile : contains >
UserAccount "1" -- "1" ProjectManager : consists of <
UserAccount "1" -- "*" Project : creates >
UserAccount "1" -- "*" Resource  : consists of <
Role "1" -- "1" ProjectManager : consists of <
Role "1" -- "1" Resource : < contains
Project "1" -- "1" ProjectManager : requires >
Project "1" -- "*" Report : < belongs to
Project "1" -- "1" ProjectTypology : requires >
Project "1" -- "1" BusinessSector : requires >
Project "1" -- "1" Costumer : requires >
Project "1" -- "*" Sprint : contains >
Project "1" -- "1" Backlog : contains >
Backlog "1" -- "*" UserStory : consists of >
UserStory "*" -- "1" Resource : creates <
Resource "1" -- "*" Task : creates >
Task "*" -- "1" SprintBacklog : Is-a-unit-of >
Sprint "1" -- "1" SprintBacklog : has a >
SprintBacklog "1" -- "*" SprintUserStory : contains >
SprintUserStory "1" -- "1" SprintUserStoryEffort : has a >


@enduml