|
| 1 | +\documentclass[tikz,border=5pt]{standalone} |
| 2 | +\usepackage{xcolor} |
| 3 | +\usetikzlibrary{calc,positioning,shapes.multipart,shapes} |
| 4 | + |
| 5 | +\definecolor{cA}{HTML}{646FA9} |
| 6 | +\definecolor{cB}{HTML}{49A9B4} |
| 7 | +\definecolor{cC}{HTML}{6BCD69} |
| 8 | +\definecolor{cD}{HTML}{9B9C78} |
| 9 | +\definecolor{cE}{HTML}{CBA18C} |
| 10 | +\definecolor{cF}{HTML}{C4737C} |
| 11 | +\definecolor{cG}{HTML}{DBDBDB} |
| 12 | +\definecolor{cX}{HTML}{6A0DAD} |
| 13 | + |
| 14 | +\begin{document} |
| 15 | +\tikzset{basic/.style={ |
| 16 | + draw, |
| 17 | + rectangle split, |
| 18 | + rectangle split parts=2, |
| 19 | + minimum width=8cm, |
| 20 | + text width=7cm, |
| 21 | + align=left, |
| 22 | + font=\ttfamily |
| 23 | + } |
| 24 | +} |
| 25 | +\begin{tikzpicture} |
| 26 | + \node[basic, rectangle split part fill={cA,white}] (products) { |
| 27 | + products |
| 28 | + |
| 29 | + \nodepart{second} |
| 30 | + name: char \hfill PK \\ |
| 31 | + team\_id: integer \hfill PK \\ |
| 32 | + % |
| 33 | + \color{cX} |
| 34 | + active: boolean \\ |
| 35 | + active\_flagged: boolean \\ |
| 36 | + deploy\_flagged: boolean \\ |
| 37 | + deployed: boolean \\ |
| 38 | + flagged: boolean |
| 39 | + }; |
| 40 | + |
| 41 | + \node[basic,rectangle split part fill={cB,white},below=2cm of products] (builds) { |
| 42 | + builds |
| 43 | + |
| 44 | + \nodepart{second} |
| 45 | + version: char \hfill PK \\ |
| 46 | + build\_token: char \hfill PK \\ |
| 47 | + \color{cA} |
| 48 | + product\_name: char \hfill PK \\ |
| 49 | + product\_team\_id: integer \hfill PK \\ |
| 50 | + \color{black} |
| 51 | + phantom: boolean \\ |
| 52 | + build\_datetime: timestamp \\ |
| 53 | + triggered\_by\_user\_id: integer \\ |
| 54 | + % |
| 55 | + \color{cX} |
| 56 | + active: boolean \\ |
| 57 | + deployed: boolean \\ |
| 58 | + flagged: boolean \\ |
| 59 | + last\_deploy\_datetime: timestamp |
| 60 | + }; |
| 61 | + |
| 62 | + \node[basic,rectangle split part fill={cE,white},below=2cm of builds] (build_deployments) { |
| 63 | + build\_deployments |
| 64 | + |
| 65 | + \nodepart{second} |
| 66 | + deployment\_token: char \hfill PK \\ |
| 67 | + deploy\_datetime: timestamp \\ |
| 68 | + \color{cB} |
| 69 | + build\_version: char \\ |
| 70 | + build\_token: char \\ |
| 71 | + build\_product\_name: char \\ |
| 72 | + build\_team\_id: integer \\ |
| 73 | + \color{black} |
| 74 | + triggered\_by\_user\_id: integer |
| 75 | + }; |
| 76 | + |
| 77 | + \node[basic,rectangle split part fill={cF,white},right=2cm of builds] (build_dependency_versions) { |
| 78 | + build\_dependency\_versions |
| 79 | + |
| 80 | + \nodepart{second} |
| 81 | + \color{cB} |
| 82 | + build\_version: char \hfill PK \\ |
| 83 | + build\_token: char \hfill PK \\ |
| 84 | + build\_product\_name: char \hfill PK \\ |
| 85 | + build\_team\_id: integer \hfill PK \\ |
| 86 | + \color{cD} |
| 87 | + dependency\_version\_version: char \hfill PK \\ |
| 88 | + dependency\_version\_name: char \hfill PK \\ |
| 89 | + dependency\_version\_source: char \hfill PK |
| 90 | + }; |
| 91 | + |
| 92 | + \node[basic,rectangle split part fill={cD,white},right=2cm of build_dependency_versions] (dependency_versions) { |
| 93 | + dependency\_versions |
| 94 | + |
| 95 | + \nodepart{second} |
| 96 | + version: char \hfill PK \\ |
| 97 | + \color{cC} |
| 98 | + dependency\_name: char \hfill PK \\ |
| 99 | + dependency\_source: char \hfill PK \\ |
| 100 | + \color{black} |
| 101 | + lookup\_hash: char |
| 102 | + }; |
| 103 | + |
| 104 | + \node[basic,rectangle split part fill={cC,white},above=2cm of dependency_versions] (dependencies) { |
| 105 | + dependencies |
| 106 | + |
| 107 | + \nodepart{second} |
| 108 | + name: char \hfill PK \\ |
| 109 | + source: char \hfill PK \\ |
| 110 | + lookup\_hash: char \\ |
| 111 | + % |
| 112 | + \color{cX} |
| 113 | + flagged: boolean |
| 114 | + }; |
| 115 | + |
| 116 | + \node[basic,rectangle split part fill={cG,white},below=2cm of dependency_versions] (dependency_version_flags) { |
| 117 | + dependency\_version\_flags |
| 118 | + |
| 119 | + \nodepart{second} |
| 120 | + depencency\_version\_flag\_id: integer \hfill PK \\ |
| 121 | + description: char \\ |
| 122 | + apply\_globally: boolean \\ |
| 123 | + flag\_datetime: timestamp \\ |
| 124 | + dependency\_version\_flag\_id: integer \\ |
| 125 | + \color{cD} |
| 126 | + dependency\_version\_version: char \\ |
| 127 | + dependency\_version\_name: char \\ |
| 128 | + dependency\_version\_source: char \\ |
| 129 | + \color{black} |
| 130 | + team\_id: integer \\ |
| 131 | + reported\_by\_user\_id: integer |
| 132 | + }; |
| 133 | + |
| 134 | + |
| 135 | + \draw[-latex] ([yshift=0pt]$(builds.north)$) -- ([yshift=0pt]$(products.south)$); |
| 136 | + \draw[-latex] ([yshift=0pt]$(build_deployments.north)$) -- ([yshift=0pt]$(builds.south)$); |
| 137 | + \draw[-latex] ([yshift=0pt]$(build_dependency_versions.west)$) -- ([yshift=0pt]$(builds.east)$); |
| 138 | + \draw[-latex] ([yshift=0pt]$(build_dependency_versions.east)$) -- ([yshift=0pt]$(dependency_versions.west)$); |
| 139 | + \draw[-latex] ([yshift=0pt]$(dependency_version_flags.north)$) -- ([yshift=0pt]$(dependency_versions.south)$); |
| 140 | + \draw[-latex] ([yshift=0pt]$(dependency_versions.north)$) -- ([yshift=0pt]$(dependencies.south)$); |
| 141 | +\end{tikzpicture} |
| 142 | +\end{document} |
0 commit comments