Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public record PostRequest(
@Valid
SavedPlaceInfo place,

@Schema(description = "상세 장소 (예: 310관 B301호)", example = "310관 B301호") // 추가됨
String detailedLocation,

@Schema(example = "2025-04-10T18:00")
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm")
LocalDateTime startDateTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonInclude;

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

@JsonInclude(JsonInclude.Include.NON_NULL)
public record GetLikedPostResponse(
@Schema(description = "게시글 id", example = "1")
Long postId,
Expand All @@ -14,6 +17,9 @@ public record GetLikedPostResponse(
@Schema(description = "게시글 장소", example = "투썸 플레이스")
String place,

@Schema(description = "상세 장소", example = "가천관 301호")
String detailedLocation,

@Schema(description = "시간(끝나는 시간 or 행사날짜)", example = "2026-01-10T18:00:00")
LocalDateTime dateTime,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public record GetPostForUserResponse(
String title,
String content,
String place,
String detailedLocation,
LocalDate startDate,
LocalDate endDate,
LocalDateTime startDateTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

import com.campus.campus.domain.councilpost.domain.entity.PostCategory;
import com.campus.campus.domain.councilpost.domain.entity.ThumbnailIcon;
import com.fasterxml.jackson.annotation.JsonInclude;

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

@JsonInclude(JsonInclude.Include.NON_NULL)
public record GetPostListForCouncilResponse(
@Schema(description = "게시글 id", example = "1")
Long postId,
Expand All @@ -20,6 +22,9 @@ public record GetPostListForCouncilResponse(
@Schema(description = "장소", example = "310관 1층")
String place,

@Schema(description = "상세 장소", example = "가천관 301호")
String detailedLocation,

@Schema(description = "시간(끝나는 시간 or 행사날짜", example = "2026-01-10T18:00:00")
LocalDateTime dateTime,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public record GetPostResponse(
String title,
String content,
String placeName,
String detailedLocation,
LocalDate startDate,
LocalDate endDate,
LocalDateTime startDateTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public record GetUpcomingEventListForCouncilResponse(
@Schema(description = "장소", example = "310관 1층")
String place,

@Schema(description = "상세 장소", example = "가천관 301호")
String detailedLocation,

@Schema(description = "시간(끝나는 시간 or 행사날짜", example = "2026-01-10T18:00:00")
LocalDateTime dateTime,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

import com.campus.campus.domain.councilpost.domain.entity.PostCategory;
import com.campus.campus.domain.councilpost.domain.entity.ThumbnailIcon;
import com.fasterxml.jackson.annotation.JsonInclude;

@JsonInclude(JsonInclude.Include.NON_NULL)
public record PostListItemResponse(
Long id,
PostCategory category,
String title,
String placeName,
String detailedLocation,
LocalDateTime endDateTime,
String thumbnailImageUrl,
ThumbnailIcon thumbnailIcon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ public PostListItemResponse toPostListItemResponse(StudentCouncilPost post, bool
post.getCategory(),
post.getTitle(),
post.getPlace().getPlaceName(),
post.isEvent()
? post.getStartDateTime()
: post.getEndDateTime(),
post.getDetailedLocation(),
post.isEvent() ? post.getStartDateTime() : post.getEndDateTime(),
post.getThumbnailImageUrl(),
post.getThumbnailIcon(),
isLiked
Expand All @@ -49,6 +48,7 @@ public GetPostListForCouncilResponse toGetPostListForCouncilResponse(StudentCoun
post.getCategory(),
post.getTitle(),
post.getPlace().getPlaceName(),
post.getDetailedLocation(),
post.isEvent() ? post.getStartDateTime() : post.getEndDateTime(),
post.getThumbnailImageUrl(),
post.getThumbnailIcon()
Expand All @@ -61,6 +61,7 @@ public GetUpcomingEventListForCouncilResponse toGetUpcomingEventListForCouncilRe
post.getCategory(),
post.getTitle(),
post.getPlace().getPlaceName(),
post.getDetailedLocation(),
post.getStartDateTime(),
post.getThumbnailIcon()
);
Expand All @@ -86,6 +87,7 @@ public GetPostResponse toGetPostResponse(StudentCouncilPost post, List<String> i
.title(post.getTitle())
.content(post.getContent())
.placeName(post.getPlace().getPlaceName())
.detailedLocation(post.getDetailedLocation())
.thumbnailImageUrl(post.getThumbnailImageUrl())
.thumbnailIcon(post.getThumbnailIcon())
.images(images != null ? images : Collections.emptyList());
Expand All @@ -111,6 +113,7 @@ public GetPostForUserResponse toGetPostForUserResponse(StudentCouncilPost post,
.title(post.getTitle())
.content(post.getContent())
.place(post.getPlace().getPlaceName())
.detailedLocation(post.getDetailedLocation())
.thumbnailImageUrl(post.getThumbnailImageUrl())
.thumbnailIcon(post.getThumbnailIcon())
.isLiked(isLiked)
Expand Down Expand Up @@ -139,6 +142,7 @@ public GetLikedPostResponse toGetLikedPostResponse(StudentCouncilPost post) {
post.getId(),
post.getTitle(),
post.getPlace().getPlaceName(),
post.getDetailedLocation(),
post.isEvent() ? post.getStartDateTime() : post.getEndDateTime(),
post.getThumbnailImageUrl()
);
Expand All @@ -152,6 +156,7 @@ public StudentCouncilPost createStudentCouncilPost(StudentCouncil writer, Place
.title(dto.title())
.content(dto.content())
.place(place)
.detailedLocation(dto.detailedLocation())
.startDateTime(startDateTime)
.endDateTime(endDateTime)
.thumbnailImageUrl(dto.thumbnailImageUrl())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public GetPostResponse update(Long councilId, Long postId, PostRequest dto) {
dto.title(),
dto.content(),
place,
dto.detailedLocation(),
normalized.startDateTime(),
normalized.endDateTime(),
dto.thumbnailImageUrl(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public class StudentCouncilPost extends BaseEntity {
@JoinColumn(name = "place_id")
private Place place;

@Column(name = "detailed_location")
private String detailedLocation;

private LocalDateTime startDateTime;
private LocalDateTime endDateTime;

Expand All @@ -62,6 +65,7 @@ public void update(
String title,
String content,
Place place,
String detailedLocation,
LocalDateTime startDateTime,
LocalDateTime endDateTime,
String thumbnailImageUrl,
Expand All @@ -71,6 +75,7 @@ public void update(
this.title = title;
this.content = content;
this.place = place;
this.detailedLocation = detailedLocation;
this.startDateTime = startDateTime;
this.endDateTime = endDateTime;
this.category = category;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public class StudentCouncilPostController {
"https://maps.googleapis.com/maps/api/place/photo?maxWidth=800&photo_reference=example3"
]
},
"detailedLocation": "대운동장",
"startDateTime": "2025-04-10T18:00",
"thumbnailIcon": "EVENT",
"imageUrls": []
Expand Down