Skip to content

Latest commit

 

History

History
473 lines (448 loc) · 7.26 KB

diagrams.adoc

File metadata and controls

473 lines (448 loc) · 7.26 KB

Diagrams

Blog

class Article {
    ~ id
    - category_id
    + title
    + content
    - top_image
    + status
    + published_at
    + updated_at
}
class Image {
    ~ id
    + path
    + url
}
class Category {
    ~ id
    + name
}
class Tag {
    ~ id
    + name
}
class Tagging {
    ~ id
    - article_id
    - tag_id
}
class ArticleMeta {
    ~ id
    - article_id
    + key
    + value
}
class Visitor {
    ~ id
    # token
    + referer
    + landing_page
    + user_agent
    + browser
    + os
    + generated_at
}
class Visit {
    ~ id
    - visitor_id
    - article_id
    + created_at
}
hide methods
left to right direction

Article::category_id }--|| Category::id
Article::id }--|| Tagging::article_id
Tagging::tag_id }--|| Tag::id
Article::top_image ||--|| Image::url
Article::content ... Image::url : embedded
ArticleMeta::article_id }--|| Article::id
Visitor::id ||--{ Visit::visitor_id
Visit::article_id }--|| Article::id

CMS

class Site {
    ~ id
    + name
    + status
    + begin_on
    + bg_color
    + text_color
}
class Page {
    ~ id
    - site_id
    + title
    + bg_color
    + text_color
}
class PagePart {
    ~ id
    - page_id
    # partable_type
    - partable_id
    + order_number
}
class PartArticle {
    ~ id
    - site_id
    + title
    + content
}
class PartImage {
    ~ id
    - site_id
    + path
}
class PartButtonGroup {
    ~ id
    - site_id
    + name
    + bg_color
    + text_color
}
class PartButton {
    ~ id
    - group_id
    + label
    + icon
}
class PagePartLink {
    ~ id
    - page_id
    # linkable_type
    - linkable_id
}
hide methods
left to right direction

Site::id ||--{ Page::site_id
Page::id ||--{ PagePart::page_id
Site::id ||--{ PartArticle::site_id
Site::id ||--{ PartImage::site_id
Site::id ||--{ PartButtonGroup::site_id
PartButtonGroup::id ||--{ PartButton::group_id
PagePart::partable_id }--|| PartArticle::id
PagePart::partable_id }--|| PartImage::id
PagePart::partable_id }--|| PartButtonGroup::id
Page::id ||--{ PagePartLink::page_id
PagePartLink::linkable_id }--|| PartImage::id
PagePartLink::linkable_id }--|| PartButton::id

DataImportFilter

class DataImportTarget {
    ~ id
    + name
    + last_imported_at
}
class DataImportConditionOperator {
    ~ id
    # parent_type
    - parent_id
    + operation
    + name
}
class DataImportCondition {
    ~ id
    - operator_id
    + column
    + filter
    + value
}
hide methods
left to right direction

DataImportTarget::id ||--|| DataImportConditionOperator::parent_id
DataImportConditionOperator ||--{ DataImportConditionOperator
DataImportConditionOperator::id ||--{ DataImportCondition::operator_id

e-Learning

class Student {
    ~ id
    + name
}
class Teacher {
    ~ id
    + name
}
class Course {
    ~ id
    - teacher_id
    + name
}
class Subscription {
    ~ id
    - student_id
    - course_id
}
class Lecture {
    ~ id
    - course_id
    + name
}
class LectureMaterial {
    ~ id
    - lecture_id
    - creator_id
    + file
}
class Submission {
    ~ id
    - student_id
    - lecture_id
    + status
}
class Review {
    ~ id
    - submission_id
    - teacher_id
    + rating
    + comment
}
class Attendance {
    ~ id
    - lecture_id
    - student_id
}
hide methods
left to right direction

Course::id ||--{ Lecture::course_id
Course::teacher_id }--|| Teacher::id
Subscription::student_id ||--|| Student::id
Course::id ||--{ Subscription::course_id
Lecture::id ||--{ LectureMaterial::lecture_id
Teacher::id ||--{ LectureMaterial::creator_id
Lecture::id ||--{ Submission::lecture_id
Submission::student_id ||--|| Student::id
Teacher::id ||--{ Review::teacher_id
Review::submission_id ||--|| Submission::id
Lecture::id ||--{ Attendance::lecture_id
Attendance::student_id ||--|| Student::id

IssueWorkflow

class Role {
    ~ id
    + name
}
class User {
    ~ id
    - role_id
    + name
}
class Issue {
    ~ id
    - creator_id
    - workflow_id
    - status_id
    - assignee_id
    + title
    + content
}
class Status {
    ~ id
    + name
}
class Workflow {
    ~ id
    + name
}
class WorkflowRule {
    ~ id
    - workflow_id
    - status_id
    - accessible_status_id
    - role_id
}
hide methods
left to right direction

User::id ||--{ Issue::creator_id
User::id ||--{ Issue::assignee_id
Issue::workflow_id }--|| Workflow::id
Issue::status_id }--|| Status::id
Workflow::id ||--{ WorkflowRule::workflow_id
Status::id ||--{ WorkflowRule::status_id
Status::id ||--{ WorkflowRule::accessible_status_id
User::role_id }--|| Role::id
Role::id ||--{ WorkflowRule::role_id

Shopping

class User {
    ~ id
    + name
    + address
    + tel
}
class Cart {
    ~ id
    - user_id
}
class Product {
    ~ id
    + name
    + price
}
class CartItem {
    ~ id
    - cart_id
    - product_id
    + quantity
}
class Order {
    ~ id
    - user_id
    + destination_address
    + tel
    + amount
    + order_date
    + status
}
class OrderItem {
    ~ id
    - order_id
    - product_id
    + amount
    + quantity
    + status
}
class Payment {
    ~ id
    - user_id
    - order_id
    + amount
}
hide methods
left to right direction

User::id ||--|| Cart::user_id
Cart::id ||--{ CartItem::cart_id
CartItem::product_id }--|| Product::id
User::id ||--{ Order::user_id
Order::id ||--{ OrderItem::order_id
OrderItem::product_id }--|| Product::id
User::id ||--{ Payment::user_id
Order::id ||--|| Payment::order_id

SNS

class User {
    ~ id
    # screen_name
    + name
    + password_digest
    + joined_on
}
class Following {
    ~ id
    - follower_id
    - followee_id
}
class Post {
    ~ id
    - user_id
    + content
    + created_at
}
class Comment {
    ~ id
    - post_id
    - user_id
    + content
    + created_at
}
class Reaction {
    ~ id
    - user_id
    # subject_type
    - subject_id
    + type
}
class Attachment {
    ~ id
    # record_type
    - record_id
    # name
    - blob_id
}
class AttachmentBlob {
    ~ id
    # uuid
    + filename
    + content_type
}
class Notification {
    ~ id
    - user_id
    + title
    + content
    # subject_type
    - subject_id
    + is_read
}
hide methods
left to right direction

Post::user_id }--|| User::id
Comment::post_id }--|| Post::id
Comment::user_id }--|| User::id
User::id ||--{ Following::follower_id
User::id ||--{ Following::followee_id
Reaction::user_id }--|| User::id
Reaction::subject_id }--|| Post::id
Reaction::subject_id }--|| Comment::id
Attachment::blob_id ||--|| AttachmentBlob::id
Post ..> Attachment::name : image
Post::id ||--{ Attachment::record_id
Comment ..> Attachment::name : image
Comment::id ||--{ Attachment::record_id
Notification::user_id }--|| User::id
Notification::subject_id }--|| Post::id

SpreadsheetFormatter

class Format {
    ~ id
    + name
}
class Paper {
    ~ id
    - format_id
    + name
}
class FormatPaper {
    ~ id
    - format_id
    - paper_id
    + order_number
}
class Accessor {
    ~ id
    - parent_id
    + type
    + value
}
class PaperAccessor {
    ~ id
    - paper_id
    - accessor_id
    + cell
    + option
}
hide methods
left to right direction

Format::id ||--{ FormatPaper::format_id
Paper::id ||--{ FormatPaper::paper_id
Accessor ||--{ Accessor : parent_id
Paper::id ||--{ PaperAccessor::paper_id
PaperAccessor::accessor_id }--|| Accessor::id