All checks were successful
CI / build (push) Successful in 32s
Clearer package name that describes what it contains. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
48 lines
1.5 KiB
Go
48 lines
1.5 KiB
Go
package eventstorming
|
|
|
|
// EventStorming model types
|
|
|
|
// Model represents an event storming model
|
|
type Model struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Events []DomainEvent `json:"events"`
|
|
Commands []Command `json:"commands"`
|
|
Aggregates []Aggregate `json:"aggregates"`
|
|
Processes []BusinessProcess `json:"processes"`
|
|
}
|
|
|
|
// DomainEvent represents a domain event definition
|
|
type DomainEvent struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
Data map[string]string `json:"data"`
|
|
}
|
|
|
|
// Command represents a command definition
|
|
type Command struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Actor string `json:"actor"`
|
|
TriggersEvent string `json:"triggersEvent"`
|
|
Data map[string]string `json:"data"`
|
|
}
|
|
|
|
// Aggregate represents an aggregate definition
|
|
type Aggregate struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Events []string `json:"events"`
|
|
Commands []string `json:"commands"`
|
|
Invariants []string `json:"invariants"`
|
|
}
|
|
|
|
// BusinessProcess represents a business process definition
|
|
type BusinessProcess struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
TriggerEvents []string `json:"triggerEvents"`
|
|
OutputCommands []string `json:"outputCommands"`
|
|
}
|