|
| 1 | +package com.somemore.volunteerapply.event; |
| 2 | + |
| 3 | +import com.fasterxml.jackson.annotation.JsonCreator; |
| 4 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 5 | +import com.somemore.global.common.event.ServerEvent; |
| 6 | +import com.somemore.global.common.event.ServerEventType; |
| 7 | +import com.somemore.notification.domain.NotificationSubType; |
| 8 | +import lombok.Getter; |
| 9 | +import lombok.experimental.SuperBuilder; |
| 10 | + |
| 11 | +import java.time.LocalDateTime; |
| 12 | +import java.util.UUID; |
| 13 | + |
| 14 | +@Getter |
| 15 | +@SuperBuilder |
| 16 | +public class VolunteerApplyEvent extends ServerEvent<NotificationSubType> { |
| 17 | + private final UUID volunteerId; |
| 18 | + private final Long volunteerApplyId; |
| 19 | + private final UUID centerId; |
| 20 | + private final Long recruitBoardId; |
| 21 | + |
| 22 | + @JsonCreator |
| 23 | + public VolunteerApplyEvent( |
| 24 | + @JsonProperty(value = "volunteerId", required = true) UUID volunteerId, |
| 25 | + @JsonProperty(value = "volunteerApplyId", required = true) Long volunteerApplyId, |
| 26 | + @JsonProperty(value = "centerId", required = true) UUID centerId, |
| 27 | + @JsonProperty(value = "recruitBoardId", required = true) Long recruitBoardId |
| 28 | + ) { |
| 29 | + super(ServerEventType.NOTIFICATION, NotificationSubType.VOLUNTEER_APPLY, LocalDateTime.now()); |
| 30 | + this.volunteerId = volunteerId; |
| 31 | + this.volunteerApplyId = volunteerApplyId; |
| 32 | + this.centerId = centerId; |
| 33 | + this.recruitBoardId = recruitBoardId; |
| 34 | + } |
| 35 | +} |
0 commit comments