Skip to content

Commit

Permalink
add plantuml diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
c5ms committed Nov 25, 2024
1 parent 6bc3e6e commit 40d0ebf
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Development blog: https://citerus.github.io/dddsample-core/

Trello board: https://trello.com/b/PTDFRyxd

## Domain architecture
![](./doc/dddsample.png)


## How to build

Using Maven (we recommend using the included Maven wrapper), run this command to compile and run all the tests:
Expand Down
File renamed without changes
File renamed without changes.
Binary file added doc/dddsample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 130 additions & 0 deletions doc/dddsample.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
@startuml

top to bottom direction
'skinparam linetype ortho
left to right direction
'!pragma layout smetana

package cargo{

entity Cargo <<AggregateRoot>> #aliceblue {
+ id: long
+ origin: Location
+ trackingId: String
+ routeSpecification: RouteSpecification
+ delivery: Delivery
+ itineraryLegs: List<Leg>
}

class RouteSpecification <<ValueObject>> {
+ origin: Location
+ destination: Location
+ arrivalDeadline: Instant
}


class Itinerary <<ValueObject>> {
- id: Long
- legs: List<Leg>
}

class Leg <<ValueObject>> {
+ id: long
+ voyage: Voyage
+ unloadTime: Instant
+ unloadLocation: Location
+ loadLocation: Location
+ loadTime: Instant
}

class Delivery <<ValueObject>> {
+ misdirected: boolean
+ calculatedAt: Instant
+ lastKnownLocation: Location
+ eta: Instant
+ nextExpectedActivity: HandlingActivity
+ transportStatus: TransportStatus
+ routingStatus: RoutingStatus
+ isUnloadedAtDestination: boolean
+ lastEvent: HandlingEvent
+ currentVoyage: Voyage
}



class HandlingActivity <<ValueObject>> {
+ location: Location
+ voyage: Voyage
+ type: Type
}

}

package handling{

entity HandlingEvent <<AggregateRoot>> #aliceblue {
+ id: long
+ type: Type
+ voyage: Voyage
+ location: Location
+ cargo: Cargo
+ completionTime: Instant
+ registrationTime: Instant
}

}


package voyage{
entity Voyage <<AggregateRoot>> #aliceblue {
+ id: long
+ carrierMovements: List<CarrierMovement>
+ voyageNumber: String
}

class CarrierMovement <<ValueObject>> {
+ id: long
+ departureLocation: Location
+ arrivalLocation: Location
+ arrivalTime: Instant
+ departureTime: Instant
}

class Schedule <<ValueObject>> {
- carrierMovements: List<CarrierMovement>
}

}

package location{
entity Location <<AggregateRoot>> #aliceblue {
+ id: long
+ name: String
+ unlocode: String
}
}



Cargo "1" *--> "routeSpecification\n1" RouteSpecification
Cargo "1" *--> "delivery\n1" Delivery
Cargo "1" *--> "itineraryLegs\n*" Leg
Cargo "1" *--> Location
Delivery "1" *--> "nextExpectedActivity\n1" HandlingActivity
Delivery "1" *--> Location
Delivery "1" *--> "currentVoyage\n1" Voyage
Delivery "1" *--> "lastEvent\n1" HandlingEvent
HandlingActivity "1" *--> Location
HandlingActivity "1" *--> "voyage\n1" Voyage
Itinerary "1" *--> "legs\n*" Leg
HandlingEvent "1" *--> Location
Leg "1" *--> Location
RouteSpecification "1" *--> Location
Schedule "1" *--> "carrierMovements\n*" CarrierMovement
Voyage "1" *--> "carrierMovements\n*" CarrierMovement
CarrierMovement "1" *--> Location

'Cargo -[#blue]> Itinerary : "«create»"
'Delivery --[#blue]> HandlingActivity : "«create»"
'Voyage --[#blue]> Schedule : "«create»"
@enduml

0 comments on commit 40d0ebf

Please sign in to comment.