Skip to content

Commit abbdfe9

Browse files
committed
feat: 플랜 도메인 DTO Schema 설명 추가
1 parent b8b72c4 commit abbdfe9

12 files changed

Lines changed: 89 additions & 0 deletions

src/main/java/com/back/web7_9_codecrete_be/domain/plans/dto/request/PlanAddRequest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.back.web7_9_codecrete_be.domain.plans.dto.request;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
34
import jakarta.validation.constraints.FutureOrPresent;
45
import jakarta.validation.constraints.NotBlank;
56
import jakarta.validation.constraints.NotNull;
@@ -12,15 +13,19 @@
1213

1314
@Getter
1415
@NoArgsConstructor
16+
@Schema(description = "일정 추가 요청 DTO")
1517
public class PlanAddRequest {
1618
@NotNull(message = "콘서트 ID는 필수입니다.")
19+
@Schema(description = "콘서트 ID", example = "1")
1720
private Long concertId;
1821

1922
@NotBlank(message = "제목은 필수입니다.")
2023
@Size(max = 100, message = "제목은 100자 이하여야 합니다.")
24+
@Schema(description = "일정 제목", example = "콘서트 관람 일정")
2125
private String title;
2226

2327
@NotNull(message = "날짜는 필수입니다.")
2428
@FutureOrPresent(message = "날짜는 현재 또는 미래 날짜여야 합니다.")
29+
@Schema(description = "일정 날짜", example = "2024-12-25", format = "yyyy-MM-dd")
2530
private LocalDate planDate;
2631
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
package com.back.web7_9_codecrete_be.domain.plans.dto.request;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
34
import jakarta.validation.constraints.NotNull;
45
import lombok.Getter;
56
import lombok.NoArgsConstructor;
67

78

89
@Getter
910
@NoArgsConstructor
11+
@Schema(description = "일정 참여자 초대 요청 DTO")
1012
public class PlanParticipantInviteRequest {
1113
@NotNull(message = "사용자 ID는 필수입니다.")
14+
@Schema(description = "초대할 사용자 ID", example = "1")
1215
private Long userId;
1316
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
package com.back.web7_9_codecrete_be.domain.plans.dto.request;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
34
import jakarta.validation.constraints.NotNull;
45
import lombok.Getter;
56
import lombok.NoArgsConstructor;
67

78

89
@Getter
910
@NoArgsConstructor
11+
@Schema(description = "일정 참여자 제거 요청 DTO")
1012
public class PlanParticipantKickRequest {
1113
@NotNull(message = "사용자 ID는 필수입니다.")
14+
@Schema(description = "제거할 사용자 ID", example = "1")
1215
private Long userId;
1316
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
package com.back.web7_9_codecrete_be.domain.plans.dto.request;
22

33
import com.back.web7_9_codecrete_be.domain.plans.entity.PlanParticipant;
4+
import io.swagger.v3.oas.annotations.media.Schema;
45
import jakarta.validation.constraints.NotNull;
56
import lombok.Getter;
67
import lombok.NoArgsConstructor;
78

89
@Getter
910
@NoArgsConstructor
11+
@Schema(description = "일정 참여자 역할 변경 요청 DTO")
1012
public class PlanParticipantRoleUpdateRequest {
1113

1214
@NotNull(message = "역할은 필수입니다.")
15+
@Schema(description = "변경할 참여자 역할", example = "MEMBER")
1316
private PlanParticipant.ParticipantRole role;
1417
}

src/main/java/com/back/web7_9_codecrete_be/domain/plans/dto/request/PlanUpdateRequest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.back.web7_9_codecrete_be.domain.plans.dto.request;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
34
import jakarta.validation.constraints.FutureOrPresent;
45
import jakarta.validation.constraints.Size;
56
import lombok.Getter;
@@ -10,10 +11,13 @@
1011

1112
@Getter
1213
@NoArgsConstructor
14+
@Schema(description = "일정 수정 요청 DTO")
1315
public class PlanUpdateRequest {
1416
@Size(max = 100, message = "제목은 100자 이하여야 합니다.")
17+
@Schema(description = "일정 제목", example = "수정된 콘서트 관람 일정")
1518
private String title;
1619

1720
@FutureOrPresent(message = "날짜는 현재 또는 미래 날짜여야 합니다.")
21+
@Schema(description = "일정 날짜", example = "2024-12-25", format = "yyyy-MM-dd")
1822
private LocalDate planDate;
1923
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
package com.back.web7_9_codecrete_be.domain.plans.dto.response;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
34
import lombok.Builder;
45
import lombok.Getter;
56

67

78
@Getter
89
@Builder
10+
@Schema(description = "일정 삭제 응답 DTO")
911
public class PlanDeleteResponse {
12+
@Schema(description = "삭제된 일정 ID", example = "1")
1013
private Long planId;
1114
}

src/main/java/com/back/web7_9_codecrete_be/domain/plans/dto/response/PlanDetailResponse.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.back.web7_9_codecrete_be.domain.plans.entity.PlanParticipant;
44
import com.back.web7_9_codecrete_be.domain.plans.entity.Schedule;
5+
import io.swagger.v3.oas.annotations.media.Schema;
56
import lombok.Builder;
67
import lombok.Getter;
78

@@ -12,47 +13,82 @@
1213

1314
@Getter
1415
@Builder
16+
@Schema(description = "일정 상세 조회 응답 DTO")
1517
public class PlanDetailResponse {
18+
@Schema(description = "일정 ID", example = "1")
1619
private Long id;
20+
@Schema(description = "콘서트 ID", example = "1")
1721
private Long concertId;
22+
@Schema(description = "일정 생성자 ID", example = "1")
1823
private Long createdBy;
24+
@Schema(description = "일정 제목", example = "콘서트 관람 일정")
1925
private String title;
26+
@Schema(description = "일정 날짜", example = "2024-12-25", format = "yyyy-MM-dd")
2027
private java.time.LocalDate planDate;
28+
@Schema(description = "생성 일시", example = "2024-12-01T10:00:00")
2129
private LocalDateTime createdDate;
30+
@Schema(description = "수정 일시", example = "2024-12-01T10:00:00")
2231
private LocalDateTime modifiedDate;
32+
@Schema(description = "참여자 목록")
2333
private List<ParticipantInfo> participants;
34+
@Schema(description = "세부 일정 목록")
2435
private List<ScheduleInfo> schedules;
36+
@Schema(description = "총 소요 시간(분)", example = "240")
2537
private Integer totalDuration;
2638

2739
@Getter
2840
@Builder
41+
@Schema(description = "참여자 정보")
2942
public static class ParticipantInfo {
43+
@Schema(description = "참여자 정보 ID", example = "1")
3044
private Long id;
45+
@Schema(description = "사용자 ID", example = "1")
3146
private Long userId;
47+
@Schema(description = "초대 상태", example = "ACCEPTED")
3248
private PlanParticipant.InviteStatus inviteStatus;
49+
@Schema(description = "참여자 역할", example = "MEMBER")
3350
private PlanParticipant.ParticipantRole role;
3451
}
3552

3653
@Getter
3754
@Builder
55+
@Schema(description = "세부 일정 정보")
3856
public static class ScheduleInfo {
57+
@Schema(description = "세부 일정 ID", example = "1")
3958
private Long id;
59+
@Schema(description = "일정 타입", example = "ACTIVITY")
4060
private Schedule.ScheduleType scheduleType;
61+
@Schema(description = "세부 일정 제목", example = "콘서트장 도착")
4162
private String title;
63+
@Schema(description = "시작 시간", example = "18:00", format = "HH:mm")
4264
private LocalTime startAt;
65+
@Schema(description = "소요 시간(분)", example = "120")
4366
private Integer duration;
67+
@Schema(description = "위치", example = "올림픽공원 올림픽홀")
4468
private String location;
69+
@Schema(description = "위치 위도", example = "37.5219")
4570
private Double locationLat;
71+
@Schema(description = "위치 경도", example = "127.1234")
4672
private Double locationLon;
73+
@Schema(description = "예상 비용(원)", example = "150000")
4774
private Integer estimatedCost;
75+
@Schema(description = "상세 정보", example = "콘서트장 입장 및 좌석 확인")
4876
private String details;
77+
@Schema(description = "출발지 위도 (TRANSPORT 타입일 때)", example = "37.5219")
4978
private Double startPlaceLat;
79+
@Schema(description = "출발지 경도 (TRANSPORT 타입일 때)", example = "127.1234")
5080
private Double startPlaceLon;
81+
@Schema(description = "도착지 위도 (TRANSPORT 타입일 때)", example = "37.5319")
5182
private Double endPlaceLat;
83+
@Schema(description = "도착지 경도 (TRANSPORT 타입일 때)", example = "127.1334")
5284
private Double endPlaceLon;
85+
@Schema(description = "거리(미터) (TRANSPORT 타입일 때)", example = "5000")
5386
private Integer distance;
87+
@Schema(description = "교통 수단 타입 (TRANSPORT 타입일 때)", example = "SUBWAY")
5488
private Schedule.TransportType transportType;
89+
@Schema(description = "생성 일시", example = "2024-12-01T10:00:00")
5590
private LocalDateTime createdDate;
91+
@Schema(description = "수정 일시", example = "2024-12-01T10:00:00")
5692
private LocalDateTime modifiedDate;
5793
}
5894
}

src/main/java/com/back/web7_9_codecrete_be/domain/plans/dto/response/PlanListResponse.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.back.web7_9_codecrete_be.domain.plans.dto.response;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
34
import lombok.Builder;
45
import lombok.Getter;
56

@@ -9,14 +10,24 @@
910

1011
@Getter
1112
@Builder
13+
@Schema(description = "일정 목록 조회 응답 DTO")
1214
public class PlanListResponse {
15+
@Schema(description = "일정 ID", example = "1")
1316
private Long id;
17+
@Schema(description = "콘서트 ID", example = "1")
1418
private Long concertId;
19+
@Schema(description = "일정 생성자 ID", example = "1")
1520
private Long createdBy;
21+
@Schema(description = "일정 제목", example = "콘서트 관람 일정")
1622
private String title;
23+
@Schema(description = "일정 날짜", example = "2024-12-25", format = "yyyy-MM-dd")
1724
private LocalDate planDate;
25+
@Schema(description = "생성 일시", example = "2024-12-01T10:00:00")
1826
private LocalDateTime createdDate;
27+
@Schema(description = "수정 일시", example = "2024-12-01T10:00:00")
1928
private LocalDateTime modifiedDate;
29+
@Schema(description = "세부 일정 항목 개수", example = "5")
2030
private Integer scheduleCount; // 일정 항목 개수
31+
@Schema(description = "총 소요 시간(분)", example = "240")
2132
private Integer totalDuration; // 총 소요 시간
2233
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
package com.back.web7_9_codecrete_be.domain.plans.dto.response;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
34
import lombok.Builder;
45
import lombok.Getter;
56

67

78
@Getter
89
@Builder
10+
@Schema(description = "일정 참여자 응답 DTO")
911
public class PlanParticipantResponse {
12+
@Schema(description = "일정 ID", example = "1")
1013
private Long planId;
14+
@Schema(description = "사용자 ID", example = "1")
1115
private Long userId;
1216
}

src/main/java/com/back/web7_9_codecrete_be/domain/plans/dto/response/PlanResponse.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.back.web7_9_codecrete_be.domain.plans.dto.response;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
34
import lombok.Builder;
45
import lombok.Getter;
56

@@ -9,12 +10,20 @@
910

1011
@Getter
1112
@Builder
13+
@Schema(description = "일정 응답 DTO")
1214
public class PlanResponse {
15+
@Schema(description = "일정 ID", example = "1")
1316
private Long id;
17+
@Schema(description = "콘서트 ID", example = "1")
1418
private Long concertId;
19+
@Schema(description = "일정 생성자 ID", example = "1")
1520
private Long createdBy;
21+
@Schema(description = "일정 제목", example = "콘서트 관람 일정")
1622
private String title;
23+
@Schema(description = "일정 날짜", example = "2024-12-25", format = "yyyy-MM-dd")
1724
private LocalDate planDate;
25+
@Schema(description = "생성 일시", example = "2024-12-01T10:00:00")
1826
private LocalDateTime createdDate;
27+
@Schema(description = "수정 일시", example = "2024-12-01T10:00:00")
1928
private LocalDateTime modifiedDate;
2029
}

0 commit comments

Comments
 (0)