Skip to content

Commit

Permalink
[SAMBAD-162] 기존 MeetingQuestionPolling 관련 클래스 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
kkjsw17 committed Aug 3, 2024
1 parent be9d4db commit 623949e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,25 @@ public class Event extends BaseTimeEntity {
@Column(name = "event_id")
private Long id;

private Long meetingMemberId;
private Long userId;

private Long meetingId;

@Enumerated(STRING)
private EventType type;

@Enumerated(STRING)
private EventStatus status;

private Event(Long meetingMemberId, EventType type, EventStatus status) {
this.meetingMemberId = meetingMemberId;
private Event(Long userId, Long meetingId, EventType type, EventStatus status) {
this.userId = userId;
this.meetingId = meetingId;
this.type = type;
this.status = status;
}

public static Event publish(Long meetingMemberId, EventType type) {
return new Event(meetingMemberId, type, ACTIVE);
public static Event publish(Long userId, Long meetingId, EventType type) {
return new Event(userId, meetingId, type, ACTIVE);
}

public void inactivate() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.depromeet.sambad.moring.event.presentation;

import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*;

import java.util.Set;

import org.depromeet.sambad.moring.event.domain.EventType;

import io.swagger.v3.oas.annotations.media.Schema;

public record PollingEventResponse(
@Schema(description = "새로운 턴의 릴레이 질문에서, 질문인이 질문을 등록했는지 여부와 질문인이 로그인한 유저인지 여부인지 응답합니다.",
examples = {"QUESTION_REGISTERED", "TARGET_MEMBER"}, requiredMode = REQUIRED)
Set<EventType> events
) {

}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import java.util.Set;

import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember;
import org.depromeet.sambad.moring.meeting.question.domain.MeetingQuestion;
import org.depromeet.sambad.moring.event.domain.EventType;

import io.swagger.v3.oas.annotations.media.Schema;
Expand All @@ -16,7 +14,4 @@ public record MeetingQuestionPollingResponse(
Set<EventType> events
) {

public static MeetingQuestionPollingResponse newQuestionOf(MeetingQuestion newQuestion, MeetingMember loginMember) {
return new MeetingQuestionPollingResponse(EventType.of(newQuestion, loginMember));
}
}

0 comments on commit 623949e

Please sign in to comment.