-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7aa5df
commit b9f21cc
Showing
2 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
@startuml | ||
|
||
!define MAIN_ENTITY #E2EFDA-C6E0B4 | ||
!define MAIN_ENTITY_2 #FCE4D6-F8CBAD | ||
!define MASTER_MARK_COLOR AAFFAA | ||
!define TRANSACTION_MARK_COLOR FFAA00 | ||
|
||
package "開発対象システム" as target_system { | ||
entity "リプライ" as reply { | ||
+ コメントID [PK] | ||
-- | ||
# 解答者ID(ユーザID) [FK] | ||
# コメントID [FK] | ||
} | ||
|
||
entity "コメント" as comment { | ||
+ コメントID [PK] | ||
-- | ||
# 解答者ID(ユーザID) [FK] | ||
# 質問ID [FK] | ||
} | ||
|
||
entity "解答" as answer { | ||
+ 解答ID [PK] | ||
-- | ||
# 解答者ID(ユーザID) [FK] | ||
# 質問ID [FK] | ||
# 本文 | ||
} | ||
|
||
entity "質問" as question <<T,TRANSACTION_MARK_COLOR>> MAIN_ENTITY_2 { | ||
+ 質問ID [PK] | ||
-- | ||
# 質問者ID(ユーザID) [FK] | ||
タイトル | ||
本文 | ||
タグ | ||
} | ||
|
||
entity "ユーザ" as user <<M,MASTER_MARK_COLOR>> MAIN_ENTITY { | ||
+ ユーザID [PK] | ||
-- | ||
ユーザ名 | ||
パスワード | ||
アイコン | ||
} | ||
} | ||
|
||
user ||-ri-|{ question | ||
question ||-ri-|{ answer | ||
answer ||-ri-|{ comment | ||
comment ||-ri-|{ reply | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
@startuml | ||
|
||
/' | ||
図の中で目立たせたいエンティティに着色するための | ||
色の名前(定数)を定義します。 | ||
'/ | ||
!define MAIN_ENTITY #E2EFDA-C6E0B4 | ||
!define MAIN_ENTITY_2 #FCE4D6-F8CBAD | ||
|
||
/' 他の色も、用途が分りやすいように名前をつけます。 '/ | ||
!define METAL #F2F2F2-D9D9D9 | ||
!define MASTER_MARK_COLOR AAFFAA | ||
!define TRANSACTION_MARK_COLOR FFAA00 | ||
|
||
/' | ||
デフォルトのスタイルを設定します。 | ||
この場合の指定は class です。entity ではエラーになります。 | ||
'/ | ||
skinparam class { | ||
BackgroundColor METAL | ||
BorderColor Black | ||
ArrowColor Black | ||
} | ||
|
||
package "外部データベース" as ext <<Database>> { | ||
entity "顧客マスタ" as customer <<M,MASTER_MARK_COLOR>> { | ||
+ 顧客ID [PK] | ||
-- | ||
顧客名 | ||
郵便番号 | ||
住所 | ||
電話番号 | ||
FAX | ||
} | ||
} | ||
|
||
package "開発対象システム" as target_system { | ||
/' | ||
マスターテーブルを M、トランザクションを T などと安直にしていますが、 | ||
チーム内でルールを決めればなんでも良いと思います。交差テーブルは "I" とか。 | ||
角丸四角形が描けない代替です。 | ||
1文字なら "主" とか "従" とか日本語でも OK だったのが受ける。 | ||
'/ | ||
entity "注文テーブル" as order <<主,TRANSACTION_MARK_COLOR>> MAIN_ENTITY { | ||
+ 注文ID [PK] | ||
-- | ||
# 顧客ID [FK] | ||
注文日時 | ||
配送希望日 | ||
配送方法 | ||
お届け先名 | ||
お届け先住所 | ||
決済方法 | ||
合計金額 | ||
消費税額 | ||
} | ||
|
||
entity "注文明細テーブル" as order_detail <<T,TRANSACTION_MARK_COLOR>> MAIN_ENTITY_2 { | ||
+ 注文ID [PK] | ||
+ 明細番号 [PK] | ||
-- | ||
# SKU [FK] | ||
注文数 | ||
税抜価格 | ||
税込価格 | ||
} | ||
|
||
entity "SKUマスタ" as sku <<M,MASTER_MARK_COLOR>> { | ||
+ SKU [PK] | ||
-- | ||
# 商品ID [FK] | ||
カラー | ||
サイズ | ||
重量 | ||
販売単価 | ||
仕入単価 | ||
} | ||
|
||
entity "商品マスタ" as product <<M,MASTER_MARK_COLOR>> { | ||
+ 商品ID [PK] | ||
-- | ||
商品名 | ||
原産国 | ||
# 仕入先ID [FK] | ||
商品カテゴリ | ||
配送必要日数 | ||
} | ||
|
||
entity "仕入先マスタ" as vendor <<M,MASTER_MARK_COLOR>> { | ||
+ 仕入先ID [PK] | ||
-- | ||
仕入れ先名 | ||
郵便番号 | ||
住所 | ||
電話番号 | ||
FAX番号 | ||
} | ||
} | ||
|
||
customer |o-ri-o{ order | ||
order ||-ri-|{ order_detail | ||
order_detail }-do-|| sku | ||
sku }-le-|| product | ||
product }o-le-|| vendor | ||
|
||
note bottom of customer : 別プロジェクト\nDB-Linkで参照する | ||
|
||
@enduml |