Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize: add plantuml diagram #152

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading