From 37aee103a62151f063be66b0ee76c61ac0558a56 Mon Sep 17 00:00:00 2001 From: Daaaai0809 Date: Sat, 30 Dec 2023 17:58:15 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20domain=20model=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/model.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/model.md b/docs/model.md index d61b805..5937ee1 100644 --- a/docs/model.md +++ b/docs/model.md @@ -49,6 +49,7 @@ Message { string channel_id "FK" string user_id "FK" string reply_to_id "FK" + string thread_id "FK" string content "" string created_at "" string updated_at "" @@ -79,7 +80,8 @@ ChannelUser }o--|| Channel : "1" Message }o--|| User : "1" Message ||--o{ Reaction : "1" -Message ||--o{ Message : "1" +Message ||--o{ Message : "Reply(reply_to_id)" +Message ||--o{ Message : "Reply to Threads(thread_id)" Message ||--o{ MessageReaction : "1" Message ||--o{ MessageReaction : "1" From 7cda7acb933213e9a89163f1c0b9b86a174bef74 Mon Sep 17 00:00:00 2001 From: Daaaai0809 Date: Sat, 30 Dec 2023 18:48:51 +0900 Subject: [PATCH 2/2] =?UTF-8?q?modify:=20=E3=83=81=E3=83=A3=E3=83=B3?= =?UTF-8?q?=E3=83=8D=E3=83=AB=E3=81=8C=E3=83=8D=E3=82=B9=E3=83=88=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/model.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/model.md b/docs/model.md index 5937ee1..ed3c8c1 100644 --- a/docs/model.md +++ b/docs/model.md @@ -34,6 +34,7 @@ ProviderType { Channel { string id "PK" string name "" + string parent_channel_id "FK" string created_at "" string deleted_at "IDX" } @@ -49,7 +50,6 @@ Message { string channel_id "FK" string user_id "FK" string reply_to_id "FK" - string thread_id "FK" string content "" string created_at "" string updated_at "" @@ -76,12 +76,12 @@ User ||--o{ ChannelUser : "1" ProviderTypeUser }o--|| ProviderType : "1" Channel ||--o{ Message : "1" +Channel ||--o{ Channel : "Nest(parent_channle_id)" ChannelUser }o--|| Channel : "1" Message }o--|| User : "1" Message ||--o{ Reaction : "1" Message ||--o{ Message : "Reply(reply_to_id)" -Message ||--o{ Message : "Reply to Threads(thread_id)" Message ||--o{ MessageReaction : "1" Message ||--o{ MessageReaction : "1"