mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 07:19:41 +02:00
Update docs
This commit is contained in:
@@ -162,41 +162,7 @@ erDiagram
|
|||||||
|
|
||||||
### Attributes
|
### Attributes
|
||||||
|
|
||||||
Attributes can be defined for entities by specifying the entity name followed by a block containing multiple `type name` pairs, where a block is delimited by an opening `{` and a closing `}`. For example:
|
Attributes can be defined for entities by specifying the entity name followed by a block containing multiple `type name` pairs, where a block is delimited by an opening `{` and a closing `}`. The attributes are rendered inside the entity boxes. For example:
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
erDiagram
|
|
||||||
CAR ||--o{ NAMED-DRIVER : allows
|
|
||||||
CAR {
|
|
||||||
string registrationNumber
|
|
||||||
string make
|
|
||||||
string model
|
|
||||||
}
|
|
||||||
PERSON ||--o{ NAMED-DRIVER : is
|
|
||||||
PERSON {
|
|
||||||
string firstName
|
|
||||||
string lastName
|
|
||||||
int age
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
erDiagram
|
|
||||||
CAR ||--o{ NAMED-DRIVER : allows
|
|
||||||
CAR {
|
|
||||||
string registrationNumber
|
|
||||||
string make
|
|
||||||
string model
|
|
||||||
}
|
|
||||||
PERSON ||--o{ NAMED-DRIVER : is
|
|
||||||
PERSON {
|
|
||||||
string firstName
|
|
||||||
string lastName
|
|
||||||
int age
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
The attributes are rendered inside the entity boxes:
|
|
||||||
|
|
||||||
```mermaid-example
|
```mermaid-example
|
||||||
erDiagram
|
erDiagram
|
||||||
|
Reference in New Issue
Block a user