참여 채널(channel) 필드 추가

- Participant 엔티티에 channel 필드 추가 (기본값: SNS)
- ParticipationRequest/Response DTO에 channel 필드 추가
- ParticipantRegisteredEvent에 channel 필드 추가
- ParticipationService에서 channel 정보 전달
- 참여 경로 분석 및 마케팅 효과 측정 가능

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
doyeon 2025-10-27 13:05:42 +09:00
parent f82e69ea0d
commit 03bbe8b021
5 changed files with 18 additions and 0 deletions

View File

@ -23,6 +23,9 @@ public class ParticipationRequest {
@Email(message = "이메일 형식이 올바르지 않습니다") @Email(message = "이메일 형식이 올바르지 않습니다")
private String email; private String email;
@Builder.Default
private String channel = "SNS";
@Builder.Default @Builder.Default
private Boolean agreeMarketing = false; private Boolean agreeMarketing = false;

View File

@ -19,6 +19,7 @@ public class ParticipationResponse {
private String name; private String name;
private String phoneNumber; private String phoneNumber;
private String email; private String email;
private String channel;
private LocalDateTime participatedAt; private LocalDateTime participatedAt;
private Boolean storeVisited; private Boolean storeVisited;
private Integer bonusEntries; private Integer bonusEntries;
@ -31,6 +32,7 @@ public class ParticipationResponse {
.name(participant.getName()) .name(participant.getName())
.phoneNumber(participant.getPhoneNumber()) .phoneNumber(participant.getPhoneNumber())
.email(participant.getEmail()) .email(participant.getEmail())
.channel(participant.getChannel())
.participatedAt(participant.getCreatedAt()) .participatedAt(participant.getCreatedAt())
.storeVisited(participant.getStoreVisited()) .storeVisited(participant.getStoreVisited())
.bonusEntries(participant.getBonusEntries()) .bonusEntries(participant.getBonusEntries())

View File

@ -60,6 +60,7 @@ public class ParticipationService {
.name(request.getName()) .name(request.getName())
.phoneNumber(request.getPhoneNumber()) .phoneNumber(request.getPhoneNumber())
.email(request.getEmail()) .email(request.getEmail())
.channel(request.getChannel())
.storeVisited(request.getStoreVisited()) .storeVisited(request.getStoreVisited())
.bonusEntries(Participant.calculateBonusEntries(request.getStoreVisited())) .bonusEntries(Participant.calculateBonusEntries(request.getStoreVisited()))
.agreeMarketing(request.getAgreeMarketing()) .agreeMarketing(request.getAgreeMarketing())

View File

@ -63,6 +63,13 @@ public class Participant extends BaseTimeEntity {
@Column(name = "email", length = 100) @Column(name = "email", length = 100)
private String email; private String email;
/**
* 참여 채널
* 기본값: SNS
*/
@Column(name = "channel", length = 20, nullable = false)
private String channel;
/** /**
* 매장 방문 여부 * 매장 방문 여부
* true일 경우 보너스 응모권 부여 * true일 경우 보너스 응모권 부여
@ -165,5 +172,8 @@ public class Participant extends BaseTimeEntity {
if (this.agreeMarketing == null) { if (this.agreeMarketing == null) {
this.agreeMarketing = false; this.agreeMarketing = false;
} }
if (this.channel == null || this.channel.isBlank()) {
this.channel = "SNS";
}
} }
} }

View File

@ -21,6 +21,7 @@ public class ParticipantRegisteredEvent {
private String eventId; private String eventId;
private String name; private String name;
private String phoneNumber; private String phoneNumber;
private String channel;
private Boolean storeVisited; private Boolean storeVisited;
private Integer bonusEntries; private Integer bonusEntries;
private LocalDateTime participatedAt; private LocalDateTime participatedAt;
@ -31,6 +32,7 @@ public class ParticipantRegisteredEvent {
.eventId(participant.getEventId()) .eventId(participant.getEventId())
.name(participant.getName()) .name(participant.getName())
.phoneNumber(participant.getPhoneNumber()) .phoneNumber(participant.getPhoneNumber())
.channel(participant.getChannel())
.storeVisited(participant.getStoreVisited()) .storeVisited(participant.getStoreVisited())
.bonusEntries(participant.getBonusEntries()) .bonusEntries(participant.getBonusEntries())
.participatedAt(participant.getCreatedAt()) .participatedAt(participant.getCreatedAt())