Files
x-stake/erd.svg
2021-09-06 00:38:48 -03:00

227 lines
19 KiB
XML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (0)
-->
<!-- Title: XStake Pages: 1 -->
<svg width="606pt" height="799pt"
viewBox="0.00 0.00 605.60 798.60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(28.8 769.8)">
<title>XStake</title>
<polygon fill="white" stroke="transparent" points="-28.8,28.8 -28.8,-769.8 576.8,-769.8 576.8,28.8 -28.8,28.8"/>
<text text-anchor="middle" x="274" y="-726.6" font-family="Arial Bold" font-size="13.00">XStake domain model</text>
<!-- m_AdminUser -->
<g id="node1" class="node">
<title>m_AdminUser</title>
<path fill="none" stroke="black" d="M12,-153C12,-153 150,-153 150,-153 156,-153 162,-159 162,-165 162,-165 162,-236 162,-236 162,-242 156,-248 150,-248 150,-248 12,-248 12,-248 6,-248 0,-242 0,-236 0,-236 0,-165 0,-165 0,-159 6,-153 12,-153"/>
<text text-anchor="start" x="49" y="-235.2" font-family="Arial Bold" font-size="11.00">AdminUser</text>
<polyline fill="none" stroke="black" points="0,-228 162,-228 "/>
<text text-anchor="start" x="7" y="-214.5" font-family="Arial" font-size="10.00">email </text>
<text text-anchor="start" x="34" y="-214.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string U</text>
<text text-anchor="start" x="7" y="-201.5" font-family="Arial" font-size="10.00">encrypted_password </text>
<text text-anchor="start" x="101" y="-201.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-188.5" font-family="Arial" font-size="10.00">remember_created_at </text>
<text text-anchor="start" x="105" y="-188.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text>
<text text-anchor="start" x="7" y="-175.5" font-family="Arial" font-size="10.00">reset_password_sent_at </text>
<text text-anchor="start" x="117" y="-175.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text>
<text text-anchor="start" x="7" y="-162.5" font-family="Arial" font-size="10.00">reset_password_token </text>
<text text-anchor="start" x="109" y="-162.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
</g>
<!-- m_Balance -->
<g id="node2" class="node">
<title>m_Balance</title>
<path fill="none" stroke="black" d="M223,-647.5C223,-647.5 343,-647.5 343,-647.5 349,-647.5 355,-653.5 355,-659.5 355,-659.5 355,-691.5 355,-691.5 355,-697.5 349,-703.5 343,-703.5 343,-703.5 223,-703.5 223,-703.5 217,-703.5 211,-697.5 211,-691.5 211,-691.5 211,-659.5 211,-659.5 211,-653.5 217,-647.5 223,-647.5"/>
<text text-anchor="start" x="259.5" y="-690.7" font-family="Arial Bold" font-size="11.00">Balance</text>
<polyline fill="none" stroke="black" points="211,-683.5 355,-683.5 "/>
<text text-anchor="start" x="218" y="-670.5" font-family="Arial" font-size="10.00">amount </text>
<text text-anchor="start" x="254" y="-670.5" font-family="Arial Italic" font-size="10.00" fill="#999999">decimal (20,10)</text>
<text text-anchor="start" x="218" y="-657.5" font-family="Arial" font-size="10.00">user_id </text>
<text text-anchor="start" x="253" y="-657.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g>
<!-- m_PaperTrail::Version -->
<g id="node6" class="node">
<title>m_PaperTrail::Version</title>
<path fill="none" stroke="black" d="M416,-410C416,-410 536,-410 536,-410 542,-410 548,-416 548,-422 548,-422 548,-493 548,-493 548,-499 542,-505 536,-505 536,-505 416,-505 416,-505 410,-505 404,-499 404,-493 404,-493 404,-422 404,-422 404,-416 410,-410 416,-410"/>
<text text-anchor="start" x="423.5" y="-492.2" font-family="Arial Bold" font-size="11.00">PaperTrail::Version</text>
<polyline fill="none" stroke="black" points="404,-485 548,-485 "/>
<text text-anchor="start" x="411" y="-471.5" font-family="Arial" font-size="10.00">event </text>
<text text-anchor="start" x="439" y="-471.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="411" y="-458.5" font-family="Arial" font-size="10.00">item_id </text>
<text text-anchor="start" x="446" y="-458.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
<text text-anchor="start" x="411" y="-445.5" font-family="Arial" font-size="10.00">item_type </text>
<text text-anchor="start" x="457" y="-445.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="411" y="-432.5" font-family="Arial" font-size="10.00">object </text>
<text text-anchor="start" x="441" y="-432.5" font-family="Arial Italic" font-size="10.00" fill="#999999">text</text>
<text text-anchor="start" x="411" y="-419.5" font-family="Arial" font-size="10.00">whodunnit </text>
<text text-anchor="start" x="459" y="-419.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
</g>
<!-- m_Balance&#45;&gt;m_PaperTrail::Version -->
<g id="edge1" class="edge">
<title>m_Balance&#45;&gt;m_PaperTrail::Version</title>
<path fill="none" stroke="black" d="M348.4,-647.33C355.4,-642.9 362.11,-637.96 368,-632.5 404.05,-599.08 432.34,-550.81 450.75,-513.42"/>
<polygon fill="black" stroke="black" points="453.67,-514.61 454.76,-505.14 448,-511.87 453.67,-514.61"/>
</g>
<!-- m_BuyCryptoOrder -->
<g id="node3" class="node">
<title>m_BuyCryptoOrder</title>
<path fill="none" stroke="black" d="M210,-535.5C210,-535.5 356,-535.5 356,-535.5 362,-535.5 368,-541.5 368,-547.5 368,-547.5 368,-605.5 368,-605.5 368,-611.5 362,-617.5 356,-617.5 356,-617.5 210,-617.5 210,-617.5 204,-617.5 198,-611.5 198,-605.5 198,-605.5 198,-547.5 198,-547.5 198,-541.5 204,-535.5 210,-535.5"/>
<text text-anchor="start" x="237" y="-604.7" font-family="Arial Bold" font-size="11.00">BuyCryptoOrder</text>
<polyline fill="none" stroke="black" points="198,-597.5 368,-597.5 "/>
<text text-anchor="start" x="205" y="-584.5" font-family="Arial" font-size="10.00">paid_amount_cents </text>
<text text-anchor="start" x="293" y="-584.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer</text>
<text text-anchor="start" x="205" y="-571.5" font-family="Arial" font-size="10.00">received_amount </text>
<text text-anchor="start" x="283" y="-571.5" font-family="Arial Italic" font-size="10.00" fill="#999999">decimal (20,10)</text>
<text text-anchor="start" x="205" y="-558.5" font-family="Arial" font-size="10.00">status </text>
<text text-anchor="start" x="236" y="-558.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="205" y="-545.5" font-family="Arial" font-size="10.00">user_id </text>
<text text-anchor="start" x="240" y="-545.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g>
<!-- m_DepositOrder -->
<g id="node4" class="node">
<title>m_DepositOrder</title>
<path fill="none" stroke="black" d="M214.5,-410C214.5,-410 351.5,-410 351.5,-410 357.5,-410 363.5,-416 363.5,-422 363.5,-422 363.5,-493 363.5,-493 363.5,-499 357.5,-505 351.5,-505 351.5,-505 214.5,-505 214.5,-505 208.5,-505 202.5,-499 202.5,-493 202.5,-493 202.5,-422 202.5,-422 202.5,-416 208.5,-410 214.5,-410"/>
<text text-anchor="start" x="245.5" y="-492.2" font-family="Arial Bold" font-size="11.00">DepositOrder</text>
<polyline fill="none" stroke="black" points="202.5,-485 363.5,-485 "/>
<text text-anchor="start" x="210" y="-471.5" font-family="Arial" font-size="10.00">paid_amount_cents </text>
<text text-anchor="start" x="298" y="-471.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer</text>
<text text-anchor="start" x="210" y="-458.5" font-family="Arial" font-size="10.00">received_amount_cents </text>
<text text-anchor="start" x="317" y="-458.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer</text>
<text text-anchor="start" x="210" y="-445.5" font-family="Arial" font-size="10.00">status </text>
<text text-anchor="start" x="241" y="-445.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="210" y="-432.5" font-family="Arial" font-size="10.00">transaction_id </text>
<text text-anchor="start" x="274" y="-432.5" font-family="Arial Italic" font-size="10.00" fill="#999999">uuid</text>
<text text-anchor="start" x="210" y="-419.5" font-family="Arial" font-size="10.00">user_id </text>
<text text-anchor="start" x="245" y="-419.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g>
<!-- m_DepositOrder&#45;&gt;m_PaperTrail::Version -->
<g id="edge2" class="edge">
<title>m_DepositOrder&#45;&gt;m_PaperTrail::Version</title>
<path fill="none" stroke="black" d="M363.62,-457.5C373.81,-457.5 384.24,-457.5 394.44,-457.5"/>
<polygon fill="black" stroke="black" points="394.74,-460.65 403.74,-457.5 394.74,-454.35 394.74,-460.65"/>
</g>
<!-- m_FiatBalance -->
<g id="node5" class="node">
<title>m_FiatBalance</title>
<path fill="none" stroke="black" d="M223,-311C223,-311 343,-311 343,-311 349,-311 355,-317 355,-323 355,-323 355,-368 355,-368 355,-374 349,-380 343,-380 343,-380 223,-380 223,-380 217,-380 211,-374 211,-368 211,-368 211,-323 211,-323 211,-317 217,-311 223,-311"/>
<text text-anchor="start" x="250" y="-367.2" font-family="Arial Bold" font-size="11.00">FiatBalance</text>
<polyline fill="none" stroke="black" points="211,-360 355,-360 "/>
<text text-anchor="start" x="218" y="-346.5" font-family="Arial" font-size="10.00">amount_cents </text>
<text text-anchor="start" x="283" y="-346.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer</text>
<text text-anchor="start" x="218" y="-333.5" font-family="Arial" font-size="10.00">amount_currency </text>
<text text-anchor="start" x="297" y="-333.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="218" y="-320.5" font-family="Arial" font-size="10.00">user_id </text>
<text text-anchor="start" x="253" y="-320.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g>
<!-- m_FiatBalance&#45;&gt;m_PaperTrail::Version -->
<g id="edge3" class="edge">
<title>m_FiatBalance&#45;&gt;m_PaperTrail::Version</title>
<path fill="none" stroke="black" d="M342.86,-380.02C359.59,-389.83 378.09,-400.67 395.82,-411.07"/>
<polygon fill="black" stroke="black" points="394.54,-413.97 403.9,-415.81 397.73,-408.54 394.54,-413.97"/>
</g>
<!-- m_SellCryptoOrder -->
<g id="node7" class="node">
<title>m_SellCryptoOrder</title>
<path fill="none" stroke="black" d="M214.5,-198.5C214.5,-198.5 351.5,-198.5 351.5,-198.5 357.5,-198.5 363.5,-204.5 363.5,-210.5 363.5,-210.5 363.5,-268.5 363.5,-268.5 363.5,-274.5 357.5,-280.5 351.5,-280.5 351.5,-280.5 214.5,-280.5 214.5,-280.5 208.5,-280.5 202.5,-274.5 202.5,-268.5 202.5,-268.5 202.5,-210.5 202.5,-210.5 202.5,-204.5 208.5,-198.5 214.5,-198.5"/>
<text text-anchor="start" x="238" y="-267.7" font-family="Arial Bold" font-size="11.00">SellCryptoOrder</text>
<polyline fill="none" stroke="black" points="202.5,-260.5 363.5,-260.5 "/>
<text text-anchor="start" x="210" y="-247.5" font-family="Arial" font-size="10.00">paid_amount </text>
<text text-anchor="start" x="269" y="-247.5" font-family="Arial Italic" font-size="10.00" fill="#999999">decimal (20,10)</text>
<text text-anchor="start" x="210" y="-234.5" font-family="Arial" font-size="10.00">received_amount_cents </text>
<text text-anchor="start" x="317" y="-234.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer</text>
<text text-anchor="start" x="210" y="-221.5" font-family="Arial" font-size="10.00">status </text>
<text text-anchor="start" x="241" y="-221.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="210" y="-208.5" font-family="Arial" font-size="10.00">user_id </text>
<text text-anchor="start" x="245" y="-208.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g>
<!-- m_StakeOrder -->
<g id="node8" class="node">
<title>m_StakeOrder</title>
<path fill="none" stroke="black" d="M223,-86.5C223,-86.5 343,-86.5 343,-86.5 349,-86.5 355,-92.5 355,-98.5 355,-98.5 355,-156.5 355,-156.5 355,-162.5 349,-168.5 343,-168.5 343,-168.5 223,-168.5 223,-168.5 217,-168.5 211,-162.5 211,-156.5 211,-156.5 211,-98.5 211,-98.5 211,-92.5 217,-86.5 223,-86.5"/>
<text text-anchor="start" x="251" y="-155.7" font-family="Arial Bold" font-size="11.00">StakeOrder</text>
<polyline fill="none" stroke="black" points="211,-148.5 355,-148.5 "/>
<text text-anchor="start" x="218" y="-135.5" font-family="Arial" font-size="10.00">amount </text>
<text text-anchor="start" x="254" y="-135.5" font-family="Arial Italic" font-size="10.00" fill="#999999">decimal (20,10)</text>
<text text-anchor="start" x="218" y="-122.5" font-family="Arial" font-size="10.00">pool_name </text>
<text text-anchor="start" x="269" y="-122.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="218" y="-109.5" font-family="Arial" font-size="10.00">status </text>
<text text-anchor="start" x="249" y="-109.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="218" y="-96.5" font-family="Arial" font-size="10.00">user_id </text>
<text text-anchor="start" x="253" y="-96.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g>
<!-- m_User -->
<g id="node9" class="node">
<title>m_User</title>
<path fill="none" stroke="black" d="M12,-278.5C12,-278.5 150,-278.5 150,-278.5 156,-278.5 162,-284.5 162,-290.5 162,-290.5 162,-400.5 162,-400.5 162,-406.5 156,-412.5 150,-412.5 150,-412.5 12,-412.5 12,-412.5 6,-412.5 0,-406.5 0,-400.5 0,-400.5 0,-290.5 0,-290.5 0,-284.5 6,-278.5 12,-278.5"/>
<text text-anchor="start" x="66.5" y="-399.7" font-family="Arial Bold" font-size="11.00">User</text>
<polyline fill="none" stroke="black" points="0,-392.5 162,-392.5 "/>
<text text-anchor="start" x="7" y="-379.5" font-family="Arial" font-size="10.00">email </text>
<text text-anchor="start" x="34" y="-379.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string U</text>
<text text-anchor="start" x="7" y="-366.5" font-family="Arial" font-size="10.00">encrypted_password </text>
<text text-anchor="start" x="101" y="-366.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-353.5" font-family="Arial" font-size="10.00">first_name </text>
<text text-anchor="start" x="56" y="-353.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-340.5" font-family="Arial" font-size="10.00">last_name </text>
<text text-anchor="start" x="56" y="-340.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-327.5" font-family="Arial" font-size="10.00">remember_created_at </text>
<text text-anchor="start" x="105" y="-327.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text>
<text text-anchor="start" x="7" y="-314.5" font-family="Arial" font-size="10.00">reset_password_sent_at </text>
<text text-anchor="start" x="117" y="-314.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text>
<text text-anchor="start" x="7" y="-301.5" font-family="Arial" font-size="10.00">reset_password_token </text>
<text text-anchor="start" x="109" y="-301.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-288.5" font-family="Arial" font-size="10.00">wallet_address </text>
<text text-anchor="start" x="76" y="-288.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
</g>
<!-- m_User&#45;&gt;m_Balance -->
<g id="edge6" class="edge">
<title>m_User&#45;&gt;m_Balance</title>
<path fill="none" stroke="black" d="M94.93,-412.53C110.13,-475.8 140.87,-570.04 198,-632.5 203.09,-638.06 209.06,-643.01 215.43,-647.39"/>
</g>
<!-- m_User&#45;&gt;m_BuyCryptoOrder -->
<g id="edge9" class="edge">
<title>m_User&#45;&gt;m_BuyCryptoOrder</title>
<path fill="none" stroke="black" d="M118.01,-412.84C138.55,-447.46 166.47,-488.88 198,-520.5 201.09,-523.59 204.37,-526.62 207.78,-529.55"/>
<polygon fill="black" stroke="black" points="205.99,-532.16 214.94,-535.45 210,-527.3 205.99,-532.16"/>
</g>
<!-- m_User&#45;&gt;m_DepositOrder -->
<g id="edge8" class="edge">
<title>m_User&#45;&gt;m_DepositOrder</title>
<path fill="none" stroke="black" d="M162.2,-390.41C172.76,-396.33 183.63,-402.41 194.32,-408.4"/>
<polygon fill="black" stroke="black" points="193.05,-411.3 202.44,-412.95 196.12,-405.8 193.05,-411.3"/>
</g>
<!-- m_User&#45;&gt;m_FiatBalance -->
<g id="edge7" class="edge">
<title>m_User&#45;&gt;m_FiatBalance</title>
<path fill="none" stroke="black" d="M162.2,-345.5C178.28,-345.5 195.08,-345.5 210.83,-345.5"/>
</g>
<!-- m_User&#45;&gt;m_SellCryptoOrder -->
<g id="edge10" class="edge">
<title>m_User&#45;&gt;m_SellCryptoOrder</title>
<path fill="none" stroke="black" d="M162.2,-303C173.39,-297.06 184.93,-290.95 196.22,-284.96"/>
<polygon fill="black" stroke="black" points="197.91,-287.63 204.39,-280.63 194.96,-282.07 197.91,-287.63"/>
</g>
<!-- m_User&#45;&gt;m_StakeOrder -->
<g id="edge5" class="edge">
<title>m_User&#45;&gt;m_StakeOrder</title>
<path fill="none" stroke="black" d="M151.11,-278.14C154.97,-273.33 158.64,-268.43 162,-263.5 183.95,-231.28 172.8,-213.25 198,-183.5 200.49,-180.57 203.16,-177.72 205.98,-174.98"/>
<polygon fill="black" stroke="black" points="208.27,-177.15 212.78,-168.75 204.01,-172.51 208.27,-177.15"/>
</g>
<!-- m_UserDocument -->
<g id="node10" class="node">
<title>m_UserDocument</title>
<path fill="none" stroke="black" d="M223,-0.5C223,-0.5 343,-0.5 343,-0.5 349,-0.5 355,-6.5 355,-12.5 355,-12.5 355,-44.5 355,-44.5 355,-50.5 349,-56.5 343,-56.5 343,-56.5 223,-56.5 223,-56.5 217,-56.5 211,-50.5 211,-44.5 211,-44.5 211,-12.5 211,-12.5 211,-6.5 217,-0.5 223,-0.5"/>
<text text-anchor="start" x="241.5" y="-43.7" font-family="Arial Bold" font-size="11.00">UserDocument</text>
<polyline fill="none" stroke="black" points="211,-36.5 355,-36.5 "/>
<text text-anchor="start" x="218" y="-23.5" font-family="Arial" font-size="10.00">status </text>
<text text-anchor="start" x="249" y="-23.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="218" y="-10.5" font-family="Arial" font-size="10.00">user_id </text>
<text text-anchor="start" x="253" y="-10.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g>
<!-- m_User&#45;&gt;m_UserDocument -->
<g id="edge4" class="edge">
<title>m_User&#45;&gt;m_UserDocument</title>
<path fill="none" stroke="black" d="M152.88,-278.49C156.26,-273.63 159.34,-268.62 162,-263.5 202.03,-186.46 146.05,-141.06 198,-71.5 200.37,-68.33 203.04,-65.37 205.94,-62.61"/>
<polygon fill="black" stroke="black" points="208.26,-64.78 213.07,-56.55 204.17,-59.98 208.26,-64.78"/>
</g>
</g>
</svg>