Skip to content

Commit

Permalink
chore: 모임 관련 번쩍 네이밍 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hoonyworld committed Jan 24, 2025
1 parent 2bf5e93 commit 1276a1d
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public Meeting(User user, Integer userId, String title, MeetingCategory category
this.joinableParts = joinableParts;
}

public static Meeting createLightningMeeting(User user, Integer userId, String title,
public static Meeting createFlashMeeting(User user, Integer userId, String title,
List<ImageUrlVO> imageURL, LocalDateTime startDate,
LocalDateTime endDate, Integer capacity, String desc,
LocalDateTime mStartDate, LocalDateTime mEndDate,
Expand All @@ -205,7 +205,7 @@ public static Meeting createLightningMeeting(User user, Integer userId, String t
.user(user)
.userId(userId)
.title(title)
.category(MeetingCategory.LIGHTNING)
.category(MeetingCategory.FLASH)
.imageURL(imageURL)
.startDate(startDate)
.endDate(endDate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public enum MeetingCategory {
STUDY("스터디"),
LECTURE("강연"),
LIGHTNING("번쩍"),
FLASH("번쩍"),
EVENT("행사"),
SEMINAR("세미나");

Expand All @@ -26,4 +26,4 @@ public static MeetingCategory ofValue(String dbData) {
public String getValue() {
return value;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

import java.util.List;

import org.sopt.makers.crew.main.lightning.v2.dto.request.LightningV2CreateLightningBodyWithoutWelcomeMessageDto;
import org.sopt.makers.crew.main.flash.v2.dto.request.FlashV2CreateFlashBodyWithoutWelcomeMessageDto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

@Schema(name = "MeetingV2CreateMeetingForLightningResponseDto", description = "번쩍 모임 생성 및 수정 request body dto")
public record MeetingV2CreateMeetingForLightningResponseDto(
@Schema(name = "MeetingV2CreateMeetingForFlashResponseDto", description = "번쩍 모임 생성 및 수정 request body dto")
public record MeetingV2CreateMeetingForFlashResponseDto(
@Schema(description = "모임 id", example = "1")
@NotNull
Integer meetingId,
Expand All @@ -27,7 +27,7 @@ public record MeetingV2CreateMeetingForLightningResponseDto(

@Schema(example = "예정 기간(협의 후 결정)", description = "번쩍 일정 결정 방식")
@NotNull
String lightningTimingType,
String flashTimingType,

@Schema(example = "2025.10.29", description = "번쩍 활동 시작 날짜", name = "activityStartDate")
@NotNull
Expand All @@ -39,10 +39,10 @@ public record MeetingV2CreateMeetingForLightningResponseDto(

@Schema(example = "오프라인", description = "모임 장소 Tag")
@NotNull
String lightningPlaceType,
String flashPlaceType,

@Schema(example = "잠실역 5번 출구", description = "모임 장소")
String lightningPlace,
String flashPlace,

@Schema(example = "1", description = "최소 모집 인원")
@Min(1)
Expand All @@ -62,20 +62,20 @@ public record MeetingV2CreateMeetingForLightningResponseDto(
@Size(max = 1)
List<String> files
) {
public static MeetingV2CreateMeetingForLightningResponseDto of(
Integer meetingId, LightningV2CreateLightningBodyWithoutWelcomeMessageDto lightningBody) {
return new MeetingV2CreateMeetingForLightningResponseDto(
public static MeetingV2CreateMeetingForFlashResponseDto of(
Integer meetingId, FlashV2CreateFlashBodyWithoutWelcomeMessageDto flashBody) {
return new MeetingV2CreateMeetingForFlashResponseDto(
meetingId,
lightningBody.title(),
lightningBody.desc(),
lightningBody.lightningTimingType(),
lightningBody.activityStartDate(),
lightningBody.activityEndDate(),
lightningBody.lightningPlaceType(),
lightningBody.lightningPlace(),
lightningBody.minimumCapacity(),
lightningBody.maximumCapacity(),
lightningBody.files()
flashBody.title(),
flashBody.desc(),
flashBody.flashTimingType(),
flashBody.activityStartDate(),
flashBody.activityEndDate(),
flashBody.flashPlaceType(),
flashBody.flashPlace(),
flashBody.minimumCapacity(),
flashBody.maximumCapacity(),
flashBody.files()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.List;

import org.sopt.makers.crew.main.lightning.v2.dto.request.LightningV2CreateLightningBodyWithoutWelcomeMessageDto;
import org.sopt.makers.crew.main.flash.v2.dto.request.FlashV2CreateFlashBodyWithoutWelcomeMessageDto;
import org.sopt.makers.crew.main.meeting.v2.dto.query.MeetingGetAppliesQueryDto;
import org.sopt.makers.crew.main.meeting.v2.dto.query.MeetingV2GetAllMeetingByOrgUserQueryDto;
import org.sopt.makers.crew.main.meeting.v2.dto.query.MeetingV2GetAllMeetingQueryDto;
Expand All @@ -12,7 +12,7 @@
import org.sopt.makers.crew.main.meeting.v2.dto.response.AppliesCsvFileUrlResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingGetApplyListResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2ApplyMeetingResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2CreateMeetingForLightningResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2CreateMeetingForFlashResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2CreateMeetingResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2GetAllMeetingByOrgUserDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2GetAllMeetingDto;
Expand Down Expand Up @@ -53,6 +53,6 @@ AppliesCsvFileUrlResponseDto getAppliesCsvFileUrl(Integer meetingId, List<Intege

MeetingV2GetRecommendDto getRecommendMeetingsByIds(List<Integer> meetingIds, Integer userId);

MeetingV2CreateMeetingForLightningResponseDto createMeetingForLightning(Integer userId,
LightningV2CreateLightningBodyWithoutWelcomeMessageDto lightningBody);
MeetingV2CreateMeetingForFlashResponseDto createMeetingForFlash(Integer userId,
FlashV2CreateFlashBodyWithoutWelcomeMessageDto flashBody);
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.sopt.makers.crew.main.entity.user.enums.UserPart;
import org.sopt.makers.crew.main.entity.user.vo.UserActivityVO;
import org.sopt.makers.crew.main.external.s3.service.S3Service;
import org.sopt.makers.crew.main.flash.v2.dto.request.FlashV2CreateFlashBodyWithoutWelcomeMessageDto;
import org.sopt.makers.crew.main.global.config.ImageSetting;
import org.sopt.makers.crew.main.global.dto.MeetingCreatorDto;
import org.sopt.makers.crew.main.global.dto.MeetingResponseDto;
Expand All @@ -59,7 +60,6 @@
import org.sopt.makers.crew.main.global.util.AdvertisementCustomPageable;
import org.sopt.makers.crew.main.global.util.Time;
import org.sopt.makers.crew.main.global.util.UserPartUtil;
import org.sopt.makers.crew.main.lightning.v2.dto.request.LightningV2CreateLightningBodyWithoutWelcomeMessageDto;
import org.sopt.makers.crew.main.meeting.v2.dto.ApplyMapper;
import org.sopt.makers.crew.main.meeting.v2.dto.MeetingMapper;
import org.sopt.makers.crew.main.meeting.v2.dto.query.MeetingGetAppliesQueryDto;
Expand All @@ -73,7 +73,7 @@
import org.sopt.makers.crew.main.meeting.v2.dto.response.ApplyWholeInfoDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingGetApplyListResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2ApplyMeetingResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2CreateMeetingForLightningResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2CreateMeetingForFlashResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2CreateMeetingResponseDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2GetAllMeetingByOrgUserDto;
import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2GetAllMeetingByOrgUserMeetingDto;
Expand Down Expand Up @@ -474,24 +474,24 @@ public MeetingV2GetRecommendDto getRecommendMeetingsByIds(List<Integer> meetingI
}

@Override
public MeetingV2CreateMeetingForLightningResponseDto createMeetingForLightning(Integer userId,
LightningV2CreateLightningBodyWithoutWelcomeMessageDto lightningBody) {
public MeetingV2CreateMeetingForFlashResponseDto createMeetingForFlash(Integer userId,
FlashV2CreateFlashBodyWithoutWelcomeMessageDto flashBody) {

User user = userRepository.findByIdOrThrow(userId);

List<ImageUrlVO> imageURL = getImageURL(lightningBody.files());
LocalDateTime activityStartDate = getActivityStartDate(lightningBody.activityStartDate());
LocalDateTime activityEndDate = getActivityEndDate((lightningBody.activityStartDate()));
List<ImageUrlVO> imageURL = getImageURL(flashBody.files());
LocalDateTime activityStartDate = getActivityStartDate(flashBody.activityStartDate());
LocalDateTime activityEndDate = getActivityEndDate((flashBody.activityStartDate()));

Meeting lightningMeeting = Meeting.createLightningMeeting(
Meeting flashMeeting = Meeting.createFlashMeeting(
user,
userId,
lightningBody.title(),
flashBody.title(),
imageURL,
time.now(),
activityStartDate, // 모집 마감일 = 활동 시작일
lightningBody.maximumCapacity(),
lightningBody.desc(),
flashBody.maximumCapacity(),
flashBody.desc(),
activityStartDate,
activityEndDate,
ACTIVE_GENERATION,
Expand All @@ -500,9 +500,9 @@ public MeetingV2CreateMeetingForLightningResponseDto createMeetingForLightning(I
EMPTY_STRING // null 대신 빈 문자열로 NPE 방지
);

meetingRepository.save(lightningMeeting);
meetingRepository.save(flashMeeting);

return MeetingV2CreateMeetingForLightningResponseDto.of(lightningMeeting.getId(), lightningBody);
return MeetingV2CreateMeetingForFlashResponseDto.of(flashMeeting.getId(), flashBody);
}

private void deleteCsvFile(String filePath) {
Expand Down Expand Up @@ -659,7 +659,7 @@ private List<ImageUrlVO> getImageURL(List<String> files) {
AtomicInteger index = new AtomicInteger(0);

if (files.isEmpty()) {
files.add(imageSetting.getDefaultLightningImage());
files.add(imageSetting.getDefaultFlashImage());
}

return files.stream()
Expand Down

0 comments on commit 1276a1d

Please sign in to comment.