# {{ .Schema.Name }}
{{- if ne .Schema.Desc "" }}

## {{ "Description" | lookup }}

{{ .Schema.Desc | nl2mdnl }}
{{- end }}
{{- if ne (len .Schema.Labels) 0 }}

## {{ "Labels" | lookup }}

{{ .Schema.Labels | label_join }}

{{- end }}
{{- if ne (len .Schema.Viewpoints) 0 }}

## {{ "Viewpoints" | lookup }}
{{ range $v := .Viewpoints }}
|{{ range $d := $v }} {{ $d | nl2br }} |{{ end }}
{{- end -}}
{{- end }}

## {{ "Tables" | lookup }}
{{ range $t := .Tables }}
|{{ range $d := $t }} {{ $d | nl2br }} |{{ end }}
{{- end -}}
{{- if .Schema.Functions }}

## {{ "Functions" | lookup }}
{{ range $t := .Functions }}
|{{ range $d := $t }} {{ $d | nl2br }} |{{ end }}
{{- end -}}
{{- end -}}
{{- if .er }}

## {{ "Relations" | lookup }}

{{ .erDiagram }}
{{- end }}

---

> Generated by [tbls](https://github.com/k1LoW/tbls)
