Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.FutureOrPresent;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
Expand All @@ -12,15 +13,19 @@

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

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

@NotNull(message = "날짜는 필수입니다.")
@FutureOrPresent(message = "날짜는 현재 또는 미래 날짜여야 합니다.")
@Schema(description = "일정 날짜", example = "2024-12-25", format = "yyyy-MM-dd")
private LocalDate planDate;
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.NoArgsConstructor;


@Getter
@NoArgsConstructor
@Schema(description = "일정 참여자 초대 요청 DTO")
public class PlanParticipantInviteRequest {
@NotNull(message = "사용자 ID는 필수입니다.")
@Schema(description = "초대할 사용자 ID", example = "1")
private Long userId;
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.NoArgsConstructor;


@Getter
@NoArgsConstructor
@Schema(description = "일정 참여자 제거 요청 DTO")
public class PlanParticipantKickRequest {
@NotNull(message = "사용자 ID는 필수입니다.")
@Schema(description = "제거할 사용자 ID", example = "1")
private Long userId;
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.request;

import com.back.web7_9_codecrete_be.domain.plans.entity.PlanParticipant;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.NoArgsConstructor;

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

@NotNull(message = "역할은 필수입니다.")
@Schema(description = "변경할 참여자 역할", example = "MEMBER")
private PlanParticipant.ParticipantRole role;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.FutureOrPresent;
import jakarta.validation.constraints.Size;
import lombok.Getter;
Expand All @@ -10,10 +11,13 @@

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

@FutureOrPresent(message = "날짜는 현재 또는 미래 날짜여야 합니다.")
@Schema(description = "일정 날짜", example = "2024-12-25", format = "yyyy-MM-dd")
private LocalDate planDate;
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Getter;


@Getter
@Builder
@Schema(description = "일정 삭제 응답 DTO")
public class PlanDeleteResponse {
@Schema(description = "삭제된 일정 ID", example = "1")
private Long planId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.back.web7_9_codecrete_be.domain.plans.entity.PlanParticipant;
import com.back.web7_9_codecrete_be.domain.plans.entity.Schedule;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Getter;

Expand All @@ -12,47 +13,82 @@

@Getter
@Builder
@Schema(description = "일정 상세 조회 응답 DTO")
public class PlanDetailResponse {
@Schema(description = "일정 ID", example = "1")
private Long id;
@Schema(description = "콘서트 ID", example = "1")
private Long concertId;
@Schema(description = "일정 생성자 ID", example = "1")
private Long createdBy;
@Schema(description = "일정 제목", example = "콘서트 관람 일정")
private String title;
@Schema(description = "일정 날짜", example = "2024-12-25", format = "yyyy-MM-dd")
private java.time.LocalDate planDate;
@Schema(description = "생성 일시", example = "2024-12-01T10:00:00")
private LocalDateTime createdDate;
@Schema(description = "수정 일시", example = "2024-12-01T10:00:00")
private LocalDateTime modifiedDate;
@Schema(description = "참여자 목록")
private List<ParticipantInfo> participants;
@Schema(description = "세부 일정 목록")
private List<ScheduleInfo> schedules;
@Schema(description = "총 소요 시간(분)", example = "240")
private Integer totalDuration;

@Getter
@Builder
@Schema(description = "참여자 정보")
public static class ParticipantInfo {
@Schema(description = "참여자 정보 ID", example = "1")
private Long id;
@Schema(description = "사용자 ID", example = "1")
private Long userId;
@Schema(description = "초대 상태", example = "ACCEPTED")
private PlanParticipant.InviteStatus inviteStatus;
@Schema(description = "참여자 역할", example = "MEMBER")
private PlanParticipant.ParticipantRole role;
}

@Getter
@Builder
@Schema(description = "세부 일정 정보")
public static class ScheduleInfo {
@Schema(description = "세부 일정 ID", example = "1")
private Long id;
@Schema(description = "일정 타입", example = "ACTIVITY")
private Schedule.ScheduleType scheduleType;
@Schema(description = "세부 일정 제목", example = "콘서트장 도착")
private String title;
@Schema(description = "시작 시간", example = "18:00", format = "HH:mm")
private LocalTime startAt;
@Schema(description = "소요 시간(분)", example = "120")
private Integer duration;
@Schema(description = "위치", example = "올림픽공원 올림픽홀")
private String location;
@Schema(description = "위치 위도", example = "37.5219")
private Double locationLat;
@Schema(description = "위치 경도", example = "127.1234")
private Double locationLon;
@Schema(description = "예상 비용(원)", example = "150000")
private Integer estimatedCost;
@Schema(description = "상세 정보", example = "콘서트장 입장 및 좌석 확인")
private String details;
@Schema(description = "출발지 위도 (TRANSPORT 타입일 때)", example = "37.5219")
private Double startPlaceLat;
@Schema(description = "출발지 경도 (TRANSPORT 타입일 때)", example = "127.1234")
private Double startPlaceLon;
@Schema(description = "도착지 위도 (TRANSPORT 타입일 때)", example = "37.5319")
private Double endPlaceLat;
@Schema(description = "도착지 경도 (TRANSPORT 타입일 때)", example = "127.1334")
private Double endPlaceLon;
@Schema(description = "거리(미터) (TRANSPORT 타입일 때)", example = "5000")
private Integer distance;
@Schema(description = "교통 수단 타입 (TRANSPORT 타입일 때)", example = "SUBWAY")
private Schedule.TransportType transportType;
@Schema(description = "생성 일시", example = "2024-12-01T10:00:00")
private LocalDateTime createdDate;
@Schema(description = "수정 일시", example = "2024-12-01T10:00:00")
private LocalDateTime modifiedDate;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Getter;

Expand All @@ -9,14 +10,24 @@

@Getter
@Builder
@Schema(description = "일정 목록 조회 응답 DTO")
public class PlanListResponse {
@Schema(description = "일정 ID", example = "1")
private Long id;
@Schema(description = "콘서트 ID", example = "1")
private Long concertId;
@Schema(description = "일정 생성자 ID", example = "1")
private Long createdBy;
@Schema(description = "일정 제목", example = "콘서트 관람 일정")
private String title;
@Schema(description = "일정 날짜", example = "2024-12-25", format = "yyyy-MM-dd")
private LocalDate planDate;
@Schema(description = "생성 일시", example = "2024-12-01T10:00:00")
private LocalDateTime createdDate;
@Schema(description = "수정 일시", example = "2024-12-01T10:00:00")
private LocalDateTime modifiedDate;
@Schema(description = "세부 일정 항목 개수", example = "5")
private Integer scheduleCount; // 일정 항목 개수
@Schema(description = "총 소요 시간(분)", example = "240")
private Integer totalDuration; // 총 소요 시간
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Getter;


@Getter
@Builder
@Schema(description = "일정 참여자 응답 DTO")
public class PlanParticipantResponse {
@Schema(description = "일정 ID", example = "1")
private Long planId;
@Schema(description = "사용자 ID", example = "1")
private Long userId;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Getter;

Expand All @@ -9,12 +10,20 @@

@Getter
@Builder
@Schema(description = "일정 응답 DTO")
public class PlanResponse {
@Schema(description = "일정 ID", example = "1")
private Long id;
@Schema(description = "콘서트 ID", example = "1")
private Long concertId;
@Schema(description = "일정 생성자 ID", example = "1")
private Long createdBy;
@Schema(description = "일정 제목", example = "콘서트 관람 일정")
private String title;
@Schema(description = "일정 날짜", example = "2024-12-25", format = "yyyy-MM-dd")
private LocalDate planDate;
@Schema(description = "생성 일시", example = "2024-12-01T10:00:00")
private LocalDateTime createdDate;
@Schema(description = "수정 일시", example = "2024-12-01T10:00:00")
private LocalDateTime modifiedDate;
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Getter;

@Getter
@Builder
@Schema(description = "세부 일정 삭제 응답 DTO")
public class ScheduleDeleteResponse {
@Schema(description = "삭제된 세부 일정 ID", example = "1")
private Long scheduleId;
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
package com.back.web7_9_codecrete_be.domain.plans.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Getter;

import java.util.List;

@Getter
@Builder
@Schema(description = "세부 일정 목록 조회 응답 DTO")
public class ScheduleListResponse {
@Schema(description = "일정 ID", example = "1")
private Long planId;
@Schema(description = "세부 일정 목록")
private List<ScheduleResponse> schedules;
@Schema(description = "총 소요 시간(분)", example = "240")
private Integer totalDuration; // 총 소요 시간 (분)
}