@startuml C4_container
!includeurl https://raw.githubusercontent.com/DummerMenschen/c4model/master/C4_Context.puml

' Colors
' ##################################


!define CONTAINER_BG_COLOR #438DD5

' Styling
' ##################################

skinparam rectangle<<container>> {
    StereotypeFontColor ELEMENT_FONT_COLOR
    FontColor ELEMENT_FONT_COLOR
    BackgroundColor CONTAINER_BG_COLOR
    BorderColor #3C7FC0
}

skinparam database<<container>> {
    StereotypeFontColor ELEMENT_FONT_COLOR
    FontColor ELEMENT_FONT_COLOR
    BackgroundColor CONTAINER_BG_COLOR
    BorderColor #3C7FC0
}

' Layout
' ##################################

' definelong not support anymore
'!definelong LAYOUT_WITH_LEGEND
'hide stereotype
'legend right
'|=              |= 类型 |
'|<PERSON_BG_COLOR>      | 参与者 |
'|<EXTERNAL_PERSON_BG_COLOR>      | 外部参与者 |
'|<SYSTEM_BG_COLOR>   | 系统 |
'|<EXTERNAL_SYSTEM_BG_COLOR>      | 外部系统 |
'|<CONTAINER_BG_COLOR>   | 容器 |
'endlegend
'!enddefinelong

!function layout_with_legend()
hide stereotype
legend right
|=              |= 类型 |
|<PERSON_BG_COLOR>      | 参与者 |
|<EXTERNAL_PERSON_BG_COLOR>      | 外部参与者 |
|<SYSTEM_BG_COLOR>   | 系统 |
|<EXTERNAL_SYSTEM_BG_COLOR>      | 外部系统 |
|<CONTAINER_BG_COLOR>   | 容器 |
endlegend
!endfunction



' Elements
' ##################################

!define Container(e_alias, e_label, e_techn) rectangle "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//" <<container>> as e_alias
!define Container(e_alias, e_label, e_techn, e_descr) rectangle "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//\n\n e_descr" <<container>> as e_alias

!define ContainerDb(e_alias, e_label, e_techn) database "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//" <<container>> as e_alias
!define ContainerDb(e_alias, e_label, e_techn, e_descr) database "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//\n\n e_descr" <<container>> as e_alias

' Boundaries
' ##################################

!define Container_Boundary(e_alias, e_label) Boundary(e_alias, e_label, "Container")
@enduml
