diff --git a/src/common-module/src/main/java/org/palette/dto/event/ReplyCreatedEvent.java b/src/common-module/src/main/java/org/palette/dto/event/ReplyCreatedEvent.java new file mode 100644 index 00000000..35f00f85 --- /dev/null +++ b/src/common-module/src/main/java/org/palette/dto/event/ReplyCreatedEvent.java @@ -0,0 +1,10 @@ +package org.palette.dto.event; + +import org.palette.dto.EaselEvent; + +public record ReplyCreatedEvent(Long pid) implements EaselEvent { + @Override + public String getTopic() { + return TopicConstant.REPLY_CREATED.value; + } +} diff --git a/src/common-module/src/main/java/org/palette/dto/event/TemporaryUserDeletionEvent.java b/src/common-module/src/main/java/org/palette/dto/event/TemporaryUserDeletionEvent.java index 63d6776c..ebcd3382 100644 --- a/src/common-module/src/main/java/org/palette/dto/event/TemporaryUserDeletionEvent.java +++ b/src/common-module/src/main/java/org/palette/dto/event/TemporaryUserDeletionEvent.java @@ -6,6 +6,6 @@ public record TemporaryUserDeletionEvent(String email) implements EaselEvent { @Override public String getTopic() { - return "temporary_user_deletion"; + return TopicConstant.TEMPORARY_USER_DELETION.value; } } diff --git a/src/common-module/src/main/java/org/palette/dto/event/TopicConstant.java b/src/common-module/src/main/java/org/palette/dto/event/TopicConstant.java index ecf8db04..2745f0b5 100644 --- a/src/common-module/src/main/java/org/palette/dto/event/TopicConstant.java +++ b/src/common-module/src/main/java/org/palette/dto/event/TopicConstant.java @@ -10,8 +10,10 @@ public enum TopicConstant { LIKED_PAINT("liked_paint"), QUOTED_PAINT("quoted_paint"), FOLLOWED("followed"), - UPDATE_USER("update_user") - + USER_CREATED("user_created"), + UPDATE_USER("update_user"), + REPLY_CREATED("reply_created"), + TEMPORARY_USER_DELETION("temporary_user_deletion"), ; final String value; diff --git a/src/common-module/src/main/java/org/palette/dto/event/UserCreatedEvent.java b/src/common-module/src/main/java/org/palette/dto/event/UserCreatedEvent.java new file mode 100644 index 00000000..1fb1ed51 --- /dev/null +++ b/src/common-module/src/main/java/org/palette/dto/event/UserCreatedEvent.java @@ -0,0 +1,16 @@ +package org.palette.dto.event; + +import org.palette.dto.EaselEvent; + +public record UserCreatedEvent( + Long id, + String nickname, + String username, + String introduce, + String profileImagePath +) implements EaselEvent { + @Override + public String getTopic() { + return TopicConstant.USER_CREATED.value; + } +} diff --git a/src/common-module/src/main/proto/social_service.proto b/src/common-module/src/main/proto/social_service.proto index 7ffc13d6..1e6ced1f 100644 --- a/src/common-module/src/main/proto/social_service.proto +++ b/src/common-module/src/main/proto/social_service.proto @@ -56,14 +56,31 @@ message GPaintResponse { string authorNickname = 5; string authorImagePath = 6; string authorStatus = 7; - GPaintResponse quote = 8; + GQuotePaintResponse quote = 8; string createdAt = 9; string text = 10; - repeated GHashtagResponse hashtags = 12; - repeated GMentionResponse mentions = 13; - repeated GUserResponse taggedUsers = 14; - repeated GMediaResponse medias = 15; - repeated GLinkResponse links = 16; + repeated GHashtagResponse hashtags = 11; + repeated GMentionResponse mentions = 12; + repeated GUserResponse taggedUsers = 13; + repeated GMediaResponse medias = 14; + repeated GLinkResponse links = 15; +} + +message GQuotePaintResponse { + int64 pid = 1; + bool isReply = 2; + int64 authorId = 3; + string authorUsername = 4; + string authorNickname = 5; + string authorImagePath = 6; + string authorStatus = 7; + string createdAt = 8; + string text = 9; + repeated GHashtagResponse hashtags = 10; + repeated GMentionResponse mentions = 11; + repeated GUserResponse taggedUsers = 12; + repeated GMediaResponse medias = 13; + repeated GLinkResponse links = 14; } message GHashtagResponse {