PowerShell Module to create Mermaid diagrams.
Add a relation to a erDiagram.
Add-MermaidErRelation [-Diagram <Object>] -Entity <String> [<CommonParameters>]
Add-MermaidErRelation [-Diagram <Object>] [-FirstEntity] <String> [-FirstCardinality] <String>
[-SecondEntity] <String> [-SecondCardinality] <String> [-Label] <String> [-NonIdentifying]
[<CommonParameters>]
Add a relation to a er diagram. Used entities do not to be defined before.
$diagram = New-MermaidDiagram -ErDiagram
PS C:\> $diagram | Add-MermaidErRelation Exactly-one Customer places Zero-or-more Order
PS C:\> $diagram | Add-MermaidErRelation Exactly-one Order contains One-or-more LineItem
PS C:\> $diagram | Add-MermaidErRelation One-or-more Customer uses One-or-more DeliveryAddress -NonIdentifying
PS C:\> $diagram | ConvertTo-MermaidString
erDiagram
Customer ||--o{ Order : places
Order ||--|{ LineItem : contains
Customer }|..|{ DeliveryAddress : uses
Create a erDiagram, add a few relations and convert it to a diagram string.
The diagram, that the relation is added to.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The first entity of the relation.
Type: String
Parameter Sets: Entity
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The first entity of the relation.
Type: String
Parameter Sets: Relation
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
How often the first entity exists in the relation.
Type: String
Parameter Sets: Relation
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The second entity of the relation.
Type: String
Parameter Sets: Relation
Aliases:
Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
How often the second entity exists in the relation.
Type: String
Parameter Sets: Relation
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Describes the relationship.
Type: String
Parameter Sets: Relation
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies if one of the entities may exist without the other.
Type: SwitchParameter
Parameter Sets: Relation
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
https://mermaid-js.github.io/mermaid/#/entityRelationshipDiagram?id=entities-and-relationships