Skip to content

Instantly share code, notes, and snippets.

@afomi
Last active August 29, 2015 14:11
Show Gist options
  • Save afomi/3e7042f6782c94b027bf to your computer and use it in GitHub Desktop.
Save afomi/3e7042f6782c94b027bf to your computer and use it in GitHub Desktop.
Tahi Data Model - 2014-12-10
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
graph[overlap=false, splines=true]
"Affiliation" [shape=Mrecord, label="{Affiliation|id :integer\luser_id :integer\lname :string\lstart_date :date\lend_date :date\lcreated_at :datetime\lupdated_at :datetime\lemail :string\l}"]
"ApiKey" [shape=Mrecord, label="{ApiKey|id :integer\laccess_token :string\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Attachment" [shape=Mrecord, label="{Attachment|id :integer\lfile :string\lattachable_id :integer\lattachable_type :string\lcreated_at :datetime\lupdated_at :datetime\ltitle :string\lcaption :string\lstatus :string\l}"]
"Author" [shape=Mrecord, label="{Author|id :integer\lfirst_name :string\llast_name :string\lcreated_at :datetime\lupdated_at :datetime\lposition :integer\lpaper_id :integer\lactable_id :integer\lactable_type :string\l}"]
"Comment" [shape=Mrecord, label="{Comment|id :integer\lbody :text\lcreated_at :datetime\lupdated_at :datetime\lcommenter_id :integer\ltask_id :integer\lentities :json\l}"]
"CommentLook" [shape=Mrecord, label="{CommentLook|id :integer\luser_id :integer\lcomment_id :integer\lread_at :datetime\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Credential" [shape=Mrecord, label="{Credential|id :integer\lprovider :string\luid :string\luser_id :integer\l}"]
"Figure" [shape=Mrecord, label="{Figure|id :integer\lattachment :string\lpaper_id :integer\lcreated_at :datetime\lupdated_at :datetime\ltitle :string\lcaption :string\lstatus :string\l}"]
"Flow" [shape=Mrecord, label="{Flow|id :integer\ltitle :string\lrole_id :integer\lposition :integer\lquery :text\l}"]
"IhatJob" [shape=Mrecord, label="{IhatJob|id :integer\lpaper_id :integer\ljob_id :string\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Journal" [shape=Mrecord, label="{Journal|id :integer\lname :string\lcreated_at :datetime\lupdated_at :datetime\llogo :string\lepub_cover :string\lepub_css :text\lpdf_css :text\lmanuscript_css :text\ldescription :text\ldoi_publisher_prefix :string\ldoi_journal_prefix :string\llast_doi_issued :string\l}"]
"JournalTaskType" [shape=Mrecord, label="{JournalTaskType|id :integer\ltask_type_id :integer\ljournal_id :integer\ltitle :string\lrole :string\lkind :string\l}"]
"Manuscript" [shape=Mrecord, label="{Manuscript|id :integer\lsource :string\lpaper_id :integer\lcreated_at :datetime\lupdated_at :datetime\lstatus :string\l}"]
"ManuscriptManagerTemplate" [shape=Mrecord, label="{ManuscriptManagerTemplate|id :integer\lpaper_type :string\ljournal_id :integer\l}"]
"Paper" [shape=Mrecord, label="{Paper|id :integer\lshort_title :string\ltitle :string\lbody :text\labstract :text\lcreated_at :datetime\lupdated_at :datetime\luser_id :integer\lpaper_type :string\lsubmitted :boolean\ljournal_id :integer\ldecision :string\ldecision_letter :text\lpublished_at :datetime\llocked_by_id :integer\lstriking_image_id :integer\llast_heartbeat_at :datetime\leditable :boolean\ldoi :text\l}"]
"PaperReview" [shape=Mrecord, label="{PaperReview|id :integer\ltask_id :integer\lbody :text\lcreated_at :datetime\lupdated_at :datetime\l}"]
"PaperRole" [shape=Mrecord, label="{PaperRole|id :integer\luser_id :integer\lpaper_id :integer\lcreated_at :datetime\lupdated_at :datetime\lrole :string\l}"]
"Participation" [shape=Mrecord, label="{Participation|id :integer\ltask_id :integer\luser_id :integer\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Phase" [shape=Mrecord, label="{Phase|id :integer\lname :string\lcreated_at :datetime\lupdated_at :datetime\lposition :integer\lpaper_id :integer\l}"]
"PhaseTemplate" [shape=Mrecord, label="{PhaseTemplate|id :integer\lname :string\lmanuscript_manager_template_id :integer\lcreated_at :datetime\lupdated_at :datetime\lposition :integer\l}"]
"Question" [shape=Mrecord, label="{Question|id :integer\lquestion :text\lanswer :text\lident :string\ltask_id :integer\ladditional_data :json\l}"]
"QuestionAttachment" [shape=Mrecord, label="{QuestionAttachment|id :integer\lquestion_id :integer\lattachment :string\ltitle :string\lstatus :string\lcreated_at :datetime\lupdated_at :datetime\l}"]
"Role" [shape=Mrecord, label="{Role|id :integer\lname :string\ljournal_id :integer\lcreated_at :datetime\lupdated_at :datetime\lcan_administer_journal :boolean\lcan_view_assigned_manuscript_managers :boolean\lcan_view_all_manuscript_managers :boolean\lkind :string\lcan_view_flow_manager :boolean\l}"]
"Task" [shape=Mrecord, label="{Task|id :integer\ltitle :string\ltype :string\lphase_id :integer\lcompleted :boolean\lcreated_at :datetime\lupdated_at :datetime\lrole :string\lbody :json\l}"]
"TaskTemplate" [shape=Mrecord, label="{TaskTemplate|id :integer\ljournal_task_type_id :integer\lphase_template_id :integer\ltemplate :json\ltitle :string\l}"]
"User" [shape=Mrecord, label="{User|id :integer\lfirst_name :string\llast_name :string\lemail :string\lencrypted_password :string\lreset_password_token :string\lreset_password_sent_at :datetime\lremember_created_at :datetime\lsign_in_count :integer\lcurrent_sign_in_at :datetime\llast_sign_in_at :datetime\lcurrent_sign_in_ip :string\llast_sign_in_ip :string\lcreated_at :datetime\lupdated_at :datetime\lusername :string\lavatar :string\lsite_admin :boolean\l}"]
"UserFlow" [shape=Mrecord, label="{UserFlow|id :integer\lcreated_at :datetime\lupdated_at :datetime\luser_id :integer\lflow_id :integer\l}"]
"UserRole" [shape=Mrecord, label="{UserRole|id :integer\luser_id :integer\lcreated_at :datetime\lupdated_at :datetime\lrole_id :integer\l}"]
"Comment" -> "CommentLook" [arrowtail=odot, arrowhead=crow, dir=both color="#787545"]
"Comment" -> "User" [label="participants", arrowtail=crow, arrowhead=crow, dir=both color="#81BE01"]
"CommentLook" -> "Task" [arrowtail=odot, arrowhead=dot, dir=both color="#C9D196"]
"CommentLook" -> "Phase" [arrowtail=odot, arrowhead=dot, dir=both color="#5F2AB3"]
"CommentLook" -> "Paper" [arrowtail=odot, arrowhead=dot, dir=both color="#201A47"]
"Flow" -> "Journal" [arrowtail=odot, arrowhead=dot, dir=both color="#177C57"]
"Flow" -> "UserFlow" [arrowtail=odot, arrowhead=crow, dir=both color="#E4C1A2"]
"Flow" -> "User" [arrowtail=crow, arrowhead=crow, dir=both color="#2BE63B"]
"Journal" -> "Paper" [arrowtail=odot, arrowhead=crow, dir=both color="#2D065F"]
"Journal" -> "Role" [arrowtail=odot, arrowhead=crow, dir=both color="#D58B65"]
"Journal" -> "UserRole" [arrowtail=crow, arrowhead=crow, dir=both color="#2E8A0C"]
"Journal" -> "User" [arrowtail=crow, arrowhead=crow, dir=both color="#E1DE0A"]
"Journal" -> "ManuscriptManagerTemplate" [arrowtail=odot, arrowhead=crow, dir=both color="#088B12"]
"Journal" -> "JournalTaskType" [arrowtail=odot, arrowhead=crow, dir=both color="#163FD7"]
"ManuscriptManagerTemplate" -> "PhaseTemplate" [arrowtail=odot, arrowhead=crow, dir=both color="#C59143"]
"Paper" -> "Manuscript" [arrowtail=odot, arrowhead=dot, dir=both color="#CE239E"]
"Paper" -> "Figure" [arrowtail=odot, arrowhead=crow, dir=both color="#1A6AD2"]
"Paper" -> "SupportingInformation::File" [label="supporting_information_files", arrowtail=odot, arrowhead=crow, dir=both color="#FB5259"]
"Paper" -> "PaperRole" [arrowtail=odot, arrowhead=crow, dir=both color="#B19BBE"]
"Paper" -> "User" [label="assigned_users", arrowtail=crow, arrowhead=crow, dir=both color="#2B2C12"]
"Paper" -> "Phase" [arrowtail=odot, arrowhead=crow, dir=both color="#84B4E9"]
"Paper" -> "Task" [arrowtail=crow, arrowhead=crow, dir=both color="#56C3ED"]
"Paper" -> "User" [label="participants", arrowtail=crow, arrowhead=crow, dir=both color="#8CA544"]
"Paper" -> "JournalRole" [arrowtail=crow, arrowhead=crow, dir=both color="#F5F080"]
"Paper" -> "Author" [arrowtail=odot, arrowhead=crow, dir=both color="#7A0A08"]
"Participation" -> "Paper" [arrowtail=odot, arrowhead=dot, dir=both color="#405ECF"]
"Phase" -> "Task" [arrowtail=odot, arrowhead=crow, dir=both color="#4BC634"]
"Phase" -> "Journal" [arrowtail=odot, arrowhead=dot, dir=both color="#E4FE04"]
"PhaseTemplate" -> "TaskTemplate" [arrowtail=odot, arrowhead=crow, dir=both color="#535D9E"]
"PhaseTemplate" -> "Journal" [arrowtail=odot, arrowhead=dot, dir=both color="#0A952D"]
"Question" -> "QuestionAttachment" [arrowtail=odot, arrowhead=dot, dir=both color="#872877"]
"Role" -> "UserRole" [arrowtail=odot, arrowhead=crow, dir=both color="#E769F4"]
"Role" -> "User" [arrowtail=crow, arrowhead=crow, dir=both color="#E426C1"]
"Role" -> "Flow" [arrowtail=odot, arrowhead=crow, dir=both color="#E812ED"]
"Task" -> "Comment" [arrowtail=odot, arrowhead=crow, dir=both color="#CBA388"]
"Task" -> "Paper" [arrowtail=odot, arrowhead=dot, dir=both color="#E0AD15"]
"Task" -> "Journal" [arrowtail=odot, arrowhead=dot, dir=both color="#A73923"]
"Task" -> "Attachment" [arrowtail=odot, arrowhead=crow, dir=both color="#F8E1DA"]
"Task" -> "Question" [arrowtail=odot, arrowhead=crow, dir=both color="#F73D48"]
"Task" -> "Participation" [arrowtail=odot, arrowhead=crow, dir=both color="#DB642B"]
"Task" -> "User" [label="participants", arrowtail=crow, arrowhead=crow, dir=both color="#CD707A"]
"TaskTemplate" -> "ManuscriptManagerTemplate" [arrowtail=odot, arrowhead=dot, dir=both color="#367C44"]
"TaskTemplate" -> "Journal" [arrowtail=odot, arrowhead=dot, dir=both color="#B5C070"]
"User" -> "Affiliation" [arrowtail=odot, arrowhead=crow, dir=both color="#57C289"]
"User" -> "Paper" [label="submitted_papers", arrowtail=odot, arrowhead=crow, dir=both color="#18A783"]
"User" -> "PaperRole" [arrowtail=odot, arrowhead=crow, dir=both color="#F40938"]
"User" -> "UserRole" [arrowtail=odot, arrowhead=crow, dir=both color="#CFAF87"]
"User" -> "UserFlow" [arrowtail=odot, arrowhead=crow, dir=both color="#FA6E5A"]
"User" -> "Comment" [arrowtail=odot, arrowhead=crow, dir=both color="#EFE255"]
"User" -> "Participation" [arrowtail=odot, arrowhead=crow, dir=both color="#9BC714"]
"User" -> "Task" [arrowtail=crow, arrowhead=crow, dir=both color="#A4659A"]
"User" -> "CommentLook" [arrowtail=odot, arrowhead=crow, dir=both color="#AB7800"]
"User" -> "Credential" [arrowtail=odot, arrowhead=crow, dir=both color="#76ABAB"]
"User" -> "Paper" [label="assigned_papers", arrowtail=crow, arrowhead=crow, dir=both color="#9D7209"]
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment