preston/bittorious

View on GitHub
doc/models_complete.svg

Summary

Maintainability
Test Coverage
<?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.38.0 (20140413.2041)
 -->
<!-- Title: models_diagram Pages: 1 -->
<svg width="827pt" height="1150pt"
 viewBox="0.00 0.00 826.58 1150.00" 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(4 1146)">
<title>models_diagram</title>
<polygon fill="none" stroke="none" points="-4,4 -4,-1146 822.583,-1146 822.583,4 -4,4"/>
<!-- _diagram_info -->
<g id="node1" class="node"><title>_diagram_info</title>
<text text-anchor="start" x="8" y="-980.6" font-family="Times,serif" font-size="13.00">Models diagram</text>
<text text-anchor="start" x="8" y="-967.6" font-family="Times,serif" font-size="13.00">Date: Sep 22 2016 &#45; 16:27</text>
<text text-anchor="start" x="8" y="-954.6" font-family="Times,serif" font-size="13.00">Migration version: 1</text>
<text text-anchor="start" x="8" y="-941.6" font-family="Times,serif" font-size="13.00">Generated by RailRoady 1.5.2</text>
<text text-anchor="start" x="8" y="-928.6" font-family="Times,serif" font-size="13.00">http://railroady.prestonlee.com</text>
</g>
<!-- Ability -->
<g id="node2" class="node"><title>Ability</title>
<polygon fill="none" stroke="black" points="193.886,-936.5 193.886,-980.5 249.555,-980.5 249.555,-936.5 193.886,-936.5"/>
<text text-anchor="middle" x="221.72" y="-965.3" font-family="Times,serif" font-size="14.00">Ability</text>
<polyline fill="none" stroke="black" points="193.886,-958.5 249.555,-958.5 "/>
<text text-anchor="middle" x="221.72" y="-943.3" font-family="Times,serif" font-size="14.00"> </text>
</g>
<!-- ApplicationRecord -->
<g id="node3" class="node"><title>ApplicationRecord</title>
<ellipse fill="none" stroke="black" cx="344.72" cy="-958.5" rx="77.2916" ry="18"/>
<text text-anchor="middle" x="344.72" y="-954.3" font-family="Times,serif" font-size="14.00">ApplicationRecord</text>
</g>
<!-- Feed -->
<g id="node4" class="node"><title>Feed</title>
<path fill="none" stroke="black" d="M411.858,-596.5C411.858,-596.5 635.583,-596.5 635.583,-596.5 641.583,-596.5 647.583,-602.5 647.583,-608.5 647.583,-608.5 647.583,-726.5 647.583,-726.5 647.583,-732.5 641.583,-738.5 635.583,-738.5 635.583,-738.5 411.858,-738.5 411.858,-738.5 405.858,-738.5 399.858,-732.5 399.858,-726.5 399.858,-726.5 399.858,-608.5 399.858,-608.5 399.858,-602.5 405.858,-596.5 411.858,-596.5"/>
<text text-anchor="middle" x="523.72" y="-723.3" font-family="Times,serif" font-size="14.00">Feed</text>
<polyline fill="none" stroke="black" points="399.858,-716.5 647.583,-716.5 "/>
<text text-anchor="start" x="407.858" y="-701.3" font-family="Times,serif" font-size="14.00">replication_percentage :integer</text>
<text text-anchor="start" x="407.858" y="-687.3" font-family="Times,serif" font-size="14.00">name :character varying</text>
<text text-anchor="start" x="407.858" y="-673.3" font-family="Times,serif" font-size="14.00">description :text</text>
<text text-anchor="start" x="407.858" y="-659.3" font-family="Times,serif" font-size="14.00">user_id :uuid</text>
<text text-anchor="start" x="407.858" y="-645.3" font-family="Times,serif" font-size="14.00">created_at :timestamp without time zone</text>
<text text-anchor="start" x="407.858" y="-631.3" font-family="Times,serif" font-size="14.00">updated_at :timestamp without time zone</text>
<text text-anchor="start" x="407.858" y="-617.3" font-family="Times,serif" font-size="14.00">enable_public_archiving :boolean</text>
<text text-anchor="start" x="407.858" y="-603.3" font-family="Times,serif" font-size="14.00">id :uuid</text>
</g>
<!-- Permission -->
<g id="node6" class="node"><title>Permission</title>
<path fill="none" stroke="black" d="M297.858,-105.5C297.858,-105.5 521.583,-105.5 521.583,-105.5 527.583,-105.5 533.583,-111.5 533.583,-117.5 533.583,-117.5 533.583,-207.5 533.583,-207.5 533.583,-213.5 527.583,-219.5 521.583,-219.5 521.583,-219.5 297.858,-219.5 297.858,-219.5 291.858,-219.5 285.858,-213.5 285.858,-207.5 285.858,-207.5 285.858,-117.5 285.858,-117.5 285.858,-111.5 291.858,-105.5 297.858,-105.5"/>
<text text-anchor="middle" x="409.72" y="-204.3" font-family="Times,serif" font-size="14.00">Permission</text>
<polyline fill="none" stroke="black" points="285.858,-197.5 533.583,-197.5 "/>
<text text-anchor="start" x="293.858" y="-182.3" font-family="Times,serif" font-size="14.00">id :uuid</text>
<text text-anchor="start" x="293.858" y="-168.3" font-family="Times,serif" font-size="14.00">user_id :uuid</text>
<text text-anchor="start" x="293.858" y="-154.3" font-family="Times,serif" font-size="14.00">feed_id :uuid</text>
<text text-anchor="start" x="293.858" y="-140.3" font-family="Times,serif" font-size="14.00">role :character varying</text>
<text text-anchor="start" x="293.858" y="-126.3" font-family="Times,serif" font-size="14.00">created_at :timestamp without time zone</text>
<text text-anchor="start" x="293.858" y="-112.3" font-family="Times,serif" font-size="14.00">updated_at :timestamp without time zone</text>
</g>
<!-- Feed&#45;&gt;Permission -->
<g id="edge2" class="edge"><title>Feed&#45;&gt;Permission</title>
<path fill="none" stroke="#1f0692" d="M444.947,-589.534C438.526,-580.152 432.908,-570.242 428.72,-560 384.136,-450.959 390.621,-310.753 399.852,-229.619"/>
<ellipse fill="none" stroke="#1f0692" cx="447.432" cy="-593.014" rx="4.00002" ry="4.00002"/>
<polygon fill="#1f0692" stroke="#1f0692" points="399.87,-229.47 405.517,-220.07 400.459,-224.505 401.048,-219.54 401.048,-219.54 401.048,-219.54 400.459,-224.505 396.58,-219.01 399.87,-229.47 399.87,-229.47"/>
</g>
<!-- Torrent -->
<g id="node7" class="node"><title>Torrent</title>
<path fill="none" stroke="black" d="M449.858,-361.5C449.858,-361.5 673.583,-361.5 673.583,-361.5 679.583,-361.5 685.583,-367.5 685.583,-373.5 685.583,-373.5 685.583,-547.5 685.583,-547.5 685.583,-553.5 679.583,-559.5 673.583,-559.5 673.583,-559.5 449.858,-559.5 449.858,-559.5 443.858,-559.5 437.858,-553.5 437.858,-547.5 437.858,-547.5 437.858,-373.5 437.858,-373.5 437.858,-367.5 443.858,-361.5 449.858,-361.5"/>
<text text-anchor="middle" x="561.72" y="-544.3" font-family="Times,serif" font-size="14.00">Torrent</text>
<polyline fill="none" stroke="black" points="437.858,-537.5 685.583,-537.5 "/>
<text text-anchor="start" x="445.858" y="-522.3" font-family="Times,serif" font-size="14.00">file_created_by :character varying</text>
<text text-anchor="start" x="445.858" y="-508.3" font-family="Times,serif" font-size="14.00">name :character varying</text>
<text text-anchor="start" x="445.858" y="-494.3" font-family="Times,serif" font-size="14.00">created_at :timestamp without time zone</text>
<text text-anchor="start" x="445.858" y="-480.3" font-family="Times,serif" font-size="14.00">updated_at :timestamp without time zone</text>
<text text-anchor="start" x="445.858" y="-466.3" font-family="Times,serif" font-size="14.00">user_id :uuid</text>
<text text-anchor="start" x="445.858" y="-452.3" font-family="Times,serif" font-size="14.00">size :bigint</text>
<text text-anchor="start" x="445.858" y="-438.3" font-family="Times,serif" font-size="14.00">info_hash :character varying</text>
<text text-anchor="start" x="445.858" y="-424.3" font-family="Times,serif" font-size="14.00">data :bytea</text>
<text text-anchor="start" x="445.858" y="-410.3" font-family="Times,serif" font-size="14.00">feed_id :uuid</text>
<text text-anchor="start" x="445.858" y="-396.3" font-family="Times,serif" font-size="14.00">pieces :integer</text>
<text text-anchor="start" x="445.858" y="-382.3" font-family="Times,serif" font-size="14.00">piece_length :integer</text>
<text text-anchor="start" x="445.858" y="-368.3" font-family="Times,serif" font-size="14.00">id :uuid</text>
</g>
<!-- Feed&#45;&gt;Torrent -->
<g id="edge1" class="edge"><title>Feed&#45;&gt;Torrent</title>
<path fill="none" stroke="#dc0574" d="M538.251,-588.112C539.387,-581.984 540.545,-575.734 541.709,-569.456"/>
<ellipse fill="none" stroke="#dc0574" cx="537.474" cy="-592.304" rx="4.00001" ry="4.00001"/>
<polygon fill="#dc0574" stroke="#dc0574" points="541.716,-569.415 547.964,-560.403 542.628,-564.499 543.539,-559.582 543.539,-559.582 543.539,-559.582 542.628,-564.499 539.114,-558.762 541.716,-569.415 541.716,-569.415"/>
</g>
<!-- Peer -->
<g id="node5" class="node"><title>Peer</title>
<path fill="none" stroke="black" d="M582.858,-0.5C582.858,-0.5 806.583,-0.5 806.583,-0.5 812.583,-0.5 818.583,-6.5 818.583,-12.5 818.583,-12.5 818.583,-312.5 818.583,-312.5 818.583,-318.5 812.583,-324.5 806.583,-324.5 806.583,-324.5 582.858,-324.5 582.858,-324.5 576.858,-324.5 570.858,-318.5 570.858,-312.5 570.858,-312.5 570.858,-12.5 570.858,-12.5 570.858,-6.5 576.858,-0.5 582.858,-0.5"/>
<text text-anchor="middle" x="694.72" y="-309.3" font-family="Times,serif" font-size="14.00">Peer</text>
<polyline fill="none" stroke="black" points="570.858,-302.5 818.583,-302.5 "/>
<text text-anchor="start" x="578.858" y="-287.3" font-family="Times,serif" font-size="14.00">torrent_id :uuid</text>
<text text-anchor="start" x="578.858" y="-273.3" font-family="Times,serif" font-size="14.00">peer_id :character varying</text>
<text text-anchor="start" x="578.858" y="-259.3" font-family="Times,serif" font-size="14.00">ip :character varying</text>
<text text-anchor="start" x="578.858" y="-245.3" font-family="Times,serif" font-size="14.00">port :integer</text>
<text text-anchor="start" x="578.858" y="-231.3" font-family="Times,serif" font-size="14.00">uploaded :integer</text>
<text text-anchor="start" x="578.858" y="-217.3" font-family="Times,serif" font-size="14.00">downloaded :integer</text>
<text text-anchor="start" x="578.858" y="-203.3" font-family="Times,serif" font-size="14.00">left :integer</text>
<text text-anchor="start" x="578.858" y="-189.3" font-family="Times,serif" font-size="14.00">state :character varying</text>
<text text-anchor="start" x="578.858" y="-175.3" font-family="Times,serif" font-size="14.00">created_at :timestamp without time zone</text>
<text text-anchor="start" x="578.858" y="-161.3" font-family="Times,serif" font-size="14.00">updated_at :timestamp without time zone</text>
<text text-anchor="start" x="578.858" y="-147.3" font-family="Times,serif" font-size="14.00">latitude :double precision</text>
<text text-anchor="start" x="578.858" y="-133.3" font-family="Times,serif" font-size="14.00">longitude :double precision</text>
<text text-anchor="start" x="578.858" y="-119.3" font-family="Times,serif" font-size="14.00">country_name :character varying</text>
<text text-anchor="start" x="578.858" y="-105.3" font-family="Times,serif" font-size="14.00">city_name :character varying</text>
<text text-anchor="start" x="578.858" y="-91.3" font-family="Times,serif" font-size="14.00">user_id :uuid</text>
<text text-anchor="start" x="578.858" y="-77.3" font-family="Times,serif" font-size="14.00">volunteer_enabled :boolean</text>
<text text-anchor="start" x="578.858" y="-63.3" font-family="Times,serif" font-size="14.00">volunteer_disk_maximum_bytes :bigint</text>
<text text-anchor="start" x="578.858" y="-49.3" font-family="Times,serif" font-size="14.00">volunteer_disk_used_bytes :bigint</text>
<text text-anchor="start" x="578.858" y="-35.3" font-family="Times,serif" font-size="14.00">volunteer_affinity_offset :integer</text>
<text text-anchor="start" x="578.858" y="-21.3" font-family="Times,serif" font-size="14.00">volunteer_affinity_length :integer</text>
<text text-anchor="start" x="578.858" y="-7.3" font-family="Times,serif" font-size="14.00">id :uuid</text>
</g>
<!-- Torrent&#45;&gt;Peer -->
<g id="edge3" class="edge"><title>Torrent&#45;&gt;Peer</title>
<path fill="none" stroke="#24cf5e" d="M609.224,-353.778C612.161,-347.24 615.153,-340.582 618.173,-333.86"/>
<ellipse fill="none" stroke="#24cf5e" cx="607.462" cy="-357.699" rx="4.00002" ry="4.00002"/>
<polygon fill="#24cf5e" stroke="#24cf5e" points="618.208,-333.783 626.411,-326.506 620.257,-329.222 622.307,-324.661 622.307,-324.661 622.307,-324.661 620.257,-329.222 618.202,-322.817 618.208,-333.783 618.208,-333.783"/>
</g>
<!-- Torrent&#45;&gt;Permission -->
<g id="edge4" class="edge"><title>Torrent&#45;&gt;Permission</title>
<path fill="none" stroke="#82a272" d="M506.738,-352.428C485.441,-310.955 461.754,-264.829 443.117,-228.535"/>
<polygon fill="#82a272" stroke="#82a272" points="506.749,-352.452 507.314,-363.403 509.033,-356.9 511.318,-361.347 511.318,-361.347 511.318,-361.347 509.033,-356.9 515.321,-359.292 506.749,-352.452 506.749,-352.452"/>
<polygon fill="#82a272" stroke="#82a272" points="443.06,-228.424 442.495,-217.473 440.776,-223.977 438.492,-219.529 438.492,-219.529 438.492,-219.529 440.776,-223.977 434.489,-221.584 443.06,-228.424 443.06,-228.424"/>
</g>
<!-- User -->
<g id="node8" class="node"><title>User</title>
<path fill="none" stroke="black" d="M452.085,-775.5C452.085,-775.5 747.355,-775.5 747.355,-775.5 753.355,-775.5 759.355,-781.5 759.355,-787.5 759.355,-787.5 759.355,-1129.5 759.355,-1129.5 759.355,-1135.5 753.355,-1141.5 747.355,-1141.5 747.355,-1141.5 452.085,-1141.5 452.085,-1141.5 446.085,-1141.5 440.085,-1135.5 440.085,-1129.5 440.085,-1129.5 440.085,-787.5 440.085,-787.5 440.085,-781.5 446.085,-775.5 452.085,-775.5"/>
<text text-anchor="middle" x="599.72" y="-1126.3" font-family="Times,serif" font-size="14.00">User</text>
<polyline fill="none" stroke="black" points="440.085,-1119.5 759.355,-1119.5 "/>
<text text-anchor="start" x="448.085" y="-1104.3" font-family="Times,serif" font-size="14.00">authentication_token :character varying</text>
<text text-anchor="start" x="448.085" y="-1090.3" font-family="Times,serif" font-size="14.00">email :character varying</text>
<text text-anchor="start" x="448.085" y="-1076.3" font-family="Times,serif" font-size="14.00">encrypted_password :character varying</text>
<text text-anchor="start" x="448.085" y="-1062.3" font-family="Times,serif" font-size="14.00">reset_password_token :character varying</text>
<text text-anchor="start" x="448.085" y="-1048.3" font-family="Times,serif" font-size="14.00">reset_password_sent_at :timestamp without time zone</text>
<text text-anchor="start" x="448.085" y="-1034.3" font-family="Times,serif" font-size="14.00">remember_created_at :timestamp without time zone</text>
<text text-anchor="start" x="448.085" y="-1020.3" font-family="Times,serif" font-size="14.00">sign_in_count :integer</text>
<text text-anchor="start" x="448.085" y="-1006.3" font-family="Times,serif" font-size="14.00">current_sign_in_at :timestamp without time zone</text>
<text text-anchor="start" x="448.085" y="-992.3" font-family="Times,serif" font-size="14.00">last_sign_in_at :timestamp without time zone</text>
<text text-anchor="start" x="448.085" y="-978.3" font-family="Times,serif" font-size="14.00">current_sign_in_ip :character varying</text>
<text text-anchor="start" x="448.085" y="-964.3" font-family="Times,serif" font-size="14.00">last_sign_in_ip :character varying</text>
<text text-anchor="start" x="448.085" y="-950.3" font-family="Times,serif" font-size="14.00">confirmation_token :character varying</text>
<text text-anchor="start" x="448.085" y="-936.3" font-family="Times,serif" font-size="14.00">confirmed_at :timestamp without time zone</text>
<text text-anchor="start" x="448.085" y="-922.3" font-family="Times,serif" font-size="14.00">confirmation_sent_at :timestamp without time zone</text>
<text text-anchor="start" x="448.085" y="-908.3" font-family="Times,serif" font-size="14.00">unconfirmed_email :character varying</text>
<text text-anchor="start" x="448.085" y="-894.3" font-family="Times,serif" font-size="14.00">failed_attempts :integer</text>
<text text-anchor="start" x="448.085" y="-880.3" font-family="Times,serif" font-size="14.00">unlock_token :character varying</text>
<text text-anchor="start" x="448.085" y="-866.3" font-family="Times,serif" font-size="14.00">locked_at :timestamp without time zone</text>
<text text-anchor="start" x="448.085" y="-852.3" font-family="Times,serif" font-size="14.00">created_at :timestamp without time zone</text>
<text text-anchor="start" x="448.085" y="-838.3" font-family="Times,serif" font-size="14.00">updated_at :timestamp without time zone</text>
<text text-anchor="start" x="448.085" y="-824.3" font-family="Times,serif" font-size="14.00">approved :boolean</text>
<text text-anchor="start" x="448.085" y="-810.3" font-family="Times,serif" font-size="14.00">admin :boolean</text>
<text text-anchor="start" x="448.085" y="-796.3" font-family="Times,serif" font-size="14.00">name :character varying</text>
<text text-anchor="start" x="448.085" y="-782.3" font-family="Times,serif" font-size="14.00">id :uuid</text>
</g>
<!-- User&#45;&gt;Feed -->
<g id="edge6" class="edge"><title>User&#45;&gt;Feed</title>
<path fill="none" stroke="#f97b30" d="M549.7,-767.292C548.033,-760.953 546.401,-754.745 544.817,-748.724"/>
<ellipse fill="none" stroke="#f97b30" cx="550.787" cy="-771.423" rx="4.00001" ry="4.00001"/>
<polygon fill="#f97b30" stroke="#f97b30" points="544.745,-748.449 546.553,-737.633 543.473,-743.613 542.201,-738.777 542.201,-738.777 542.201,-738.777 543.473,-743.613 537.849,-739.922 544.745,-748.449 544.745,-748.449"/>
</g>
<!-- User&#45;&gt;Peer -->
<g id="edge8" class="edge"><title>User&#45;&gt;Peer</title>
<path fill="none" stroke="#3bc604" d="M669.616,-767.694C672.22,-758.049 674.612,-748.447 676.72,-739 706.517,-605.45 709.595,-450.178 706.008,-334.597"/>
<ellipse fill="none" stroke="#3bc604" cx="668.546" cy="-771.579" rx="4.00001" ry="4.00001"/>
<polygon fill="#3bc604" stroke="#3bc604" points="706.008,-334.588 710.176,-324.445 705.843,-329.591 705.678,-324.594 705.678,-324.594 705.678,-324.594 705.843,-329.591 701.181,-324.742 706.008,-334.588 706.008,-334.588"/>
</g>
<!-- User&#45;&gt;Permission -->
<g id="edge7" class="edge"><title>User&#45;&gt;Permission</title>
<path fill="none" stroke="#c11a57" d="M434.187,-778.428C433.029,-777.28 431.873,-776.137 430.72,-775 413.688,-758.208 400.573,-760.794 390.72,-739 313.771,-568.786 359.279,-340.439 389.473,-229.512"/>
<ellipse fill="none" stroke="#c11a57" cx="437.159" cy="-781.389" rx="4.00002" ry="4.00002"/>
<polygon fill="#c11a57" stroke="#c11a57" points="389.495,-229.432 396.498,-220.994 390.828,-224.613 392.161,-219.794 392.161,-219.794 392.161,-219.794 390.828,-224.613 387.824,-218.594 389.495,-229.432 389.495,-229.432"/>
</g>
<!-- User&#45;&gt;Torrent -->
<g id="edge5" class="edge"><title>User&#45;&gt;Torrent</title>
<path fill="none" stroke="#5c4379" d="M662.424,-767.058C672.127,-711.133 673.994,-650.399 656.72,-596 653.768,-586.702 649.914,-577.493 645.452,-568.514"/>
<ellipse fill="none" stroke="#5c4379" cx="661.649" cy="-771.337" rx="4.00001" ry="4.00001"/>
<polygon fill="#5c4379" stroke="#5c4379" points="645.434,-568.478 644.786,-557.532 643.116,-564.048 640.799,-559.617 640.799,-559.617 640.799,-559.617 643.116,-564.048 636.811,-561.703 645.434,-568.478 645.434,-568.478"/>
</g>
</g>
</svg>