diff --git a/diagrams/admin-erd.mmd b/diagrams/admin-erd.mmd new file mode 100644 index 000000000..17766f15c --- /dev/null +++ b/diagrams/admin-erd.mmd @@ -0,0 +1,80 @@ +classDiagram + direction RL + class `CreateFormService::CreateFormEvent` + `CreateFormService::CreateFormEvent` : +integer dedup_version + `CreateFormService::CreateFormEvent` : +integer form_id + `CreateFormService::CreateFormEvent` : +string form_name + class `DraftQuestion` + `DraftQuestion` : +jsonb answer_settings + `DraftQuestion` : +text answer_type + `DraftQuestion` : +integer form_id + `DraftQuestion` : +text guidance_markdown + `DraftQuestion` : +text hint_text + `DraftQuestion` : +boolean is_optional + `DraftQuestion` : +boolean is_repeatable + `DraftQuestion` : +text page_heading + `DraftQuestion` : +integer page_id + `DraftQuestion` : +text question_text + class `FormSubmissionEmail` + `FormSubmissionEmail` : +string confirmation_code + `FormSubmissionEmail` : +string created_by_email + `FormSubmissionEmail` : +string created_by_name + `FormSubmissionEmail` : +integer form_id + `FormSubmissionEmail` : +string temporary_submission_email + `FormSubmissionEmail` : +string updated_by_email + `FormSubmissionEmail` : +string updated_by_name + class `Group` + `Group` : +boolean branch_routing_enabled + `Group` : +boolean exit_pages_enabled + `Group` : +text external_id + `Group` : +boolean file_upload_enabled + `Group` : +string name + `Group` : +string status + class `GroupForm` + `GroupForm` : +integer form_id + class `Membership` + `Membership` : +string role + class `MouSignature` + class `Organisation` + `Organisation` : +string abbreviation + `Organisation` : +boolean closed + `Organisation` : +integer default_group_id + `Organisation` : +string govuk_content_id + `Organisation` : +boolean internal + `Organisation` : +string name + `Organisation` : +string slug + class `PaperTrail::Version` + `PaperTrail::Version` : +string event + `PaperTrail::Version` : +string item_type + `PaperTrail::Version` : +jsonb object + `PaperTrail::Version` : +jsonb object_changes + `PaperTrail::Version` : +string whodunnit + class `User` + `User` : +string app_name + `User` : +boolean disabled + `User` : +string email + `User` : +boolean has_access + `User` : +datetime last_signed_in_at + `User` : +string name + `User` : +string organisation_content_id + `User` : +string organisation_slug + `User` : +text permissions + `User` : +string provider + `User` : +boolean remotely_signed_out + `User` : +string role + `User` : +datetime terms_agreed_at + `User` : +string uid + `Item` --> `PaperTrail::Version` + `Organisation` --> `PaperTrail::Version` + `User` --> `PaperTrail::Version` + `User` --> `CreateFormService::CreateFormEvent` + `Group` --> `CreateFormService::CreateFormEvent` + `Organisation` --> `User` + `User` --> `Membership` + `User` ..> `Group` + `User` --> `MouSignature` + `User` --> `DraftQuestion` + `Organisation` --> `Group` + `Organisation` --> `MouSignature` + `Group` --> `Membership` + `Group` --> `GroupForm` \ No newline at end of file diff --git a/diagrams/api-erd.mmd b/diagrams/api-erd.mmd new file mode 100644 index 000000000..4576c53c4 --- /dev/null +++ b/diagrams/api-erd.mmd @@ -0,0 +1,89 @@ +classDiagram + direction RL + class `AccessToken` + `AccessToken` : +datetime deactivated_at + `AccessToken` : +string description + `AccessToken` : +datetime last_accessed_at + `AccessToken` : +string owner + `AccessToken` : +string token_digest + class `Api::V2::Form` + `Api::V2::Form` : +integer creator_id + `Api::V2::Form` : +boolean declaration_section_completed + `Api::V2::Form` : +text declaration_text + `Api::V2::Form` : +string external_id + `Api::V2::Form` : +text form_slug + `Api::V2::Form` : +text name + `Api::V2::Form` : +string payment_url + `Api::V2::Form` : +text privacy_policy_url + `Api::V2::Form` : +boolean question_section_completed + `Api::V2::Form` : +string s3_bucket_aws_account_id + `Api::V2::Form` : +string s3_bucket_name + `Api::V2::Form` : +string s3_bucket_region + `Api::V2::Form` : +boolean share_preview_completed + `Api::V2::Form` : +string state + `Api::V2::Form` : +text submission_email + `Api::V2::Form` : +string submission_type + `Api::V2::Form` : +text support_email + `Api::V2::Form` : +text support_phone + `Api::V2::Form` : +text support_url + `Api::V2::Form` : +text support_url_text + `Api::V2::Form` : +text what_happens_next_markdown + class `Api::V2::FormDocument` + `Api::V2::FormDocument` : +jsonb content + `Api::V2::FormDocument` : +text tag + class `Condition` + `Condition` : +string answer_value + `Condition` : +text exit_page_heading + `Condition` : +text exit_page_markdown + `Condition` : +boolean skip_to_end + class `Form` + `Form` : +integer creator_id + `Form` : +boolean declaration_section_completed + `Form` : +text declaration_text + `Form` : +string external_id + `Form` : +text form_slug + `Form` : +text name + `Form` : +string payment_url + `Form` : +text privacy_policy_url + `Form` : +boolean question_section_completed + `Form` : +string s3_bucket_aws_account_id + `Form` : +string s3_bucket_name + `Form` : +string s3_bucket_region + `Form` : +boolean share_preview_completed + `Form` : +string state + `Form` : +text submission_email + `Form` : +string submission_type + `Form` : +text support_email + `Form` : +text support_phone + `Form` : +text support_url + `Form` : +text support_url_text + `Form` : +text what_happens_next_markdown + class `MadeLiveForm` + `MadeLiveForm` : +json json_form_blob + class `Page` + `Page` : +jsonb answer_settings + `Page` : +text answer_type + `Page` : +text guidance_markdown + `Page` : +text hint_text + `Page` : +boolean is_optional + `Page` : +boolean is_repeatable + `Page` : +integer next_page + `Page` : +text page_heading + `Page` : +integer position + `Page` : +text question_text + class `PaperTrail::Version` + `PaperTrail::Version` : +string event + `PaperTrail::Version` : +string item_type + `PaperTrail::Version` : +jsonb object + `PaperTrail::Version` : +jsonb object_changes + `PaperTrail::Version` : +string whodunnit + `Item` --> `PaperTrail::Version` + `Condition` --> `PaperTrail::Version` + `Form` --> `PaperTrail::Version` + `Page` --> `PaperTrail::Version` + `Api::V2::Form` --> `Api::V2::FormDocument` + `Form` --> `Page` + `Page` --> `Condition` + `Form` --> `MadeLiveForm` + `Form` --> `Api::V2::FormDocument` + `Condition` .. `Form` \ No newline at end of file diff --git a/diagrams/runner-erd.mmd b/diagrams/runner-erd.mmd new file mode 100644 index 000000000..4c74ae7f6 --- /dev/null +++ b/diagrams/runner-erd.mmd @@ -0,0 +1,11 @@ +classDiagram + direction RL + class `Submission` + `Submission` : +jsonb answers + `Submission` : +jsonb form_document + `Submission` : +integer form_id + `Submission` : +string mail_message_id + `Submission` : +string mail_status + `Submission` : +string mode + `Submission` : +string reference + `Submission` : +datetime sent_at \ No newline at end of file