Skip to content

Commit d6992bc

Browse files
committed
refactor: VolunteerInfo -> RecruitmentInfo 객체명 변경
1 parent 7f3d31b commit d6992bc

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/main/java/com/somemore/recruitboard/domain/RecruitBoard.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class RecruitBoard extends BaseEntity {
4545
private String content;
4646

4747
@Embedded
48-
private VolunteerInfo volunteerInfo;
48+
private RecruitmentInfo recruitmentInfo;
4949

5050
@Enumerated(value = STRING)
5151
@Column(name = "recruit_status", nullable = false, length = 20)
@@ -56,36 +56,36 @@ public class RecruitBoard extends BaseEntity {
5656

5757
@Builder
5858
public RecruitBoard(UUID centerId, Long locationId, String title, String content,
59-
VolunteerInfo volunteerInfo, String imgUrl) {
59+
RecruitmentInfo recruitmentInfo, String imgUrl) {
6060
this.centerId = centerId;
6161
this.locationId = locationId;
6262
this.title = title;
6363
this.content = content;
64-
this.volunteerInfo = volunteerInfo;
64+
this.recruitmentInfo = recruitmentInfo;
6565
this.imgUrl = imgUrl;
6666
}
6767

6868
public LocalTime getVolunteerHours() {
69-
return volunteerInfo.calculateVolunteerTime();
69+
return recruitmentInfo.calculateVolunteerTime();
7070
}
7171

7272
public boolean isWriter(UUID centerId) {
7373
return this.centerId.equals(centerId);
7474
}
7575

7676
public void updateWith(RecruitBoardUpdateRequestDto dto, String imgUrl) {
77-
updateVolunteerInfo(dto);
77+
updateRecruitmentInfo(dto);
7878
this.title = dto.title();
7979
this.content = dto.content();
8080
this.imgUrl = imgUrl;
8181
}
8282

8383
public void updateWith(String region) {
84-
volunteerInfo.updateWith(region);
84+
recruitmentInfo.updateWith(region);
8585
}
8686

87-
private void updateVolunteerInfo(RecruitBoardUpdateRequestDto dto) {
88-
volunteerInfo.updateWith(
87+
private void updateRecruitmentInfo(RecruitBoardUpdateRequestDto dto) {
88+
recruitmentInfo.updateWith(
8989
dto.recruitmentCount(),
9090
dto.volunteerType(),
9191
dto.volunteerStartDateTime(),

src/main/java/com/somemore/recruitboard/domain/VolunteerInfo.java renamed to src/main/java/com/somemore/recruitboard/domain/RecruitmentInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@Getter
1818
@NoArgsConstructor(access = PROTECTED)
1919
@Embeddable
20-
public class VolunteerInfo {
20+
public class RecruitmentInfo {
2121

2222
@Column(name = "region", nullable = false)
2323
private String region;
@@ -39,7 +39,7 @@ public class VolunteerInfo {
3939
private Boolean admitted;
4040

4141
@Builder
42-
public VolunteerInfo(String region, Integer recruitmentCount,
42+
public RecruitmentInfo(String region, Integer recruitmentCount,
4343
LocalDateTime volunteerStartDateTime, LocalDateTime volunteerEndDateTime,
4444
VolunteerType volunteerType, Boolean admitted) {
4545

src/main/java/com/somemore/recruitboard/dto/request/RecruitBoardCreateRequestDto.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.fasterxml.jackson.databind.annotation.JsonNaming;
55
import com.somemore.location.dto.request.LocationCreateRequestDto;
66
import com.somemore.recruitboard.domain.RecruitBoard;
7-
import com.somemore.recruitboard.domain.VolunteerInfo;
7+
import com.somemore.recruitboard.domain.RecruitmentInfo;
88
import com.somemore.recruitboard.domain.VolunteerType;
99
import io.swagger.v3.oas.annotations.media.Schema;
1010
import jakarta.validation.constraints.NotBlank;
@@ -45,7 +45,7 @@ public record RecruitBoardCreateRequestDto(
4545
) {
4646

4747
public RecruitBoard toEntity(UUID centerId, Long locationId, String imgUrl) {
48-
VolunteerInfo volunteerInfo = VolunteerInfo.builder()
48+
RecruitmentInfo recruitmentInfo = RecruitmentInfo.builder()
4949
.region(region)
5050
.recruitmentCount(recruitmentCount)
5151
.volunteerStartDateTime(volunteerStartDateTime)
@@ -60,7 +60,7 @@ public RecruitBoard toEntity(UUID centerId, Long locationId, String imgUrl) {
6060
.title(title)
6161
.content(content)
6262
.imgUrl(imgUrl)
63-
.volunteerInfo(volunteerInfo)
63+
.recruitmentInfo(recruitmentInfo)
6464
.build();
6565
}
6666
}

0 commit comments

Comments
 (0)