eugene-manuilov/typeorm-uml

Display whether or not the columns are nullable

ValentinVignal opened this issue · 1 comments

It would be nice to include in the generated diagrams the (non-)nullability of some columns.

a suggestion on how this could look:

image

name is NOT NULL, while label is nullable

diagram
@startuml
!define table(ename, dbname) entity "<b>dbname</b>"

!define pkey(x) {field} <b><color:DarkGoldenRod><&key></color> x</b>
!define fkey(x) {field} <color:#AAAAAA><&key></color> x
!define column(x) {field} <color:#EFEFEF><&media-record></color> x
!define rcolumn(x) {field} <color:#a19f9f><&media-record></color> x

hide stereotypes
hide methods
hide circle


top to bottom direction

skinparam roundcorner 5
skinparam linetype ortho
skinparam shadowing false
skinparam handwritten false

skinparam class {
    BackgroundColor white
    ArrowColor seagreen
    BorderColor seagreen
}


table( RoleEntity, Role ) as Role {
  pkey( id ): TINYINT(4) 
  rcolumn( name ): CHAR(10) 
  column( label ): CHAR(20) 
}
@enduml