docs: https://mermaid.js.org/syntax/classDiagram.html
## 基本的な書き方
````
```mermaid
classDiagram
class BankAccount{
+ String owner
+ BigDecimal balance
+ deposit(amount)
+ withdrawal(amout)
}
```
````
```mermaid
classDiagram
class BankAccount{
+ String owner
+ BigDecimal balance
+ deposit(amount)
+ withdrawal(amout)
}
```
## 型の書き方
型の書き方は [[C言語 MOC|C言語]] ライクでも [[TypeScript MOC|TypeScript]] ライクでもいい。
```
classDiagram
class A {
- id: int
- position: List~int~
+ setPoints(points: List~int~)
+ getPoints() List~int~
}
```
```mermaid
classDiagram
class A {
- id: int
- position: List~int~
+ setPoints(points: List~int~)
+ getPoints() List~int~
}
```
```
classDiagram
class A {
- int id
- List~int~ position
+ setPoints(List~int~ points)
+ getPoints() List~int~
}
```
```mermaid
classDiagram
class A {
- int id
- List~int~ position
+ setPoints(List~int~ points)
+ getPoints() List~int~
}
```
## 関係図
![[Mermaidのクラス間関係の表現]]