Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
68fedc0
feature/KD-41: 엔티티 repository,domain추가 및 devlop변경사항 업데이트
dkdltm221 Oct 17, 2025
3324dd0
feature/KD-41: ScheduleManagement 도메인 및 repository service구현
dkdltm221 Oct 20, 2025
c49ee9e
feature/KD-41: Schedule도메인 이름 수정민 jpa baseTime상속 추가
dkdltm221 Oct 29, 2025
7b0a1b6
feature/KD-41: Schedule도메인 필드 추가 및 로직 수정
dkdltm221 Nov 1, 2025
0a387aa
feature/KD-41: Schedule API 설계 및 기존 코드 메서드 이름 통일
dkdltm221 Nov 2, 2025
58e1cde
feature/KD-41: Schedule 도메인,엔티티 유형별 본문 내용 조회로직 추가 및 생성시 유형 중복 막는 검증 로…
dkdltm221 Nov 6, 2025
6a245d6
feature/KD-41: Schedule 일정만 조회할 수 있도록 dto분리 및 기존 scheduleDetailRespon…
dkdltm221 Nov 6, 2025
74ac4e0
feature/KD-41: Schedule 일정만 수정할 수 있도록 dto 분리 및 일정 유형 수정시 본문내용 수정할수있는 …
dkdltm221 Nov 6, 2025
c8ff434
feature/KD-41-domain: develop 변경사항 업데이트
dkdltm221 Nov 10, 2025
7a12a7c
Merge branch 'develop' into feature/KD-41
dkdltm221 Nov 16, 2025
f9d4e87
Merge remote-tracking branch 'origin/develop' into feature/KD-41
dkdltm221 Nov 16, 2025
7dfb8c0
feature/KD-48: schedule respository 제거 및 service 일정 삭제 예외 처리 추가 및 업데이…
dkdltm221 Nov 16, 2025
d642df7
feature/KD-48: @FutureOrPresent 어노테이션 제거
dkdltm221 Nov 16, 2025
19452da
feature/KD-48: statusAt -> determineStatusAt 메소드 이름 수정
dkdltm221 Nov 16, 2025
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
@@ -0,0 +1,52 @@
package kgu.developers.admin.schedule.application;

import kgu.developers.admin.schedule.presentation.request.ScheduleContentUpdateRequest;
import kgu.developers.admin.schedule.presentation.request.ScheduleCreateRequest;
import kgu.developers.admin.schedule.presentation.request.ScheduleUpdateRequest;
import kgu.developers.admin.schedule.presentation.response.SchedulePersistResponse;
import kgu.developers.domain.schedule.application.command.ScheduleService;
import kgu.developers.domain.schedule.application.query.ScheduleQueryService;
import kgu.developers.domain.schedule.domain.Schedule;
import kgu.developers.domain.schedule.domain.SubmissionType;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component
@RequiredArgsConstructor
public class ScheduleAdminFacade {
private final ScheduleService scheduleService;
private final ScheduleQueryService scheduleQueryService;

public SchedulePersistResponse createSchedule(ScheduleCreateRequest request) {
Long id = scheduleService.createSchedule(
request.submissionType(),
request.title(),
request.content(),
request.startDate(),
request.endDate()
);
return SchedulePersistResponse.from(id);
}
Comment on lines +21 to +30
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

생성 메서드에 트랜잭션 어노테이션이 누락되었습니다.

createSchedule 메서드는 데이터를 생성하는 쓰기 작업이므로 @Transactional 어노테이션이 필요합니다. 트랜잭션 관리가 없으면 예외 발생 시 롤백이 제대로 이루어지지 않을 수 있습니다.

다음 diff를 적용하세요:

+    @Transactional
     public SchedulePersistResponse createSchedule(ScheduleCreateRequest request) {
         Long id = scheduleService.createSchedule(
                 request.submissionType(),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public SchedulePersistResponse createSchedule(ScheduleCreateRequest request) {
Long id = scheduleService.createSchedule(
request.submissionType(),
request.title(),
request.content(),
request.startDate(),
request.endDate()
);
return SchedulePersistResponse.from(id);
}
@Transactional
public SchedulePersistResponse createSchedule(ScheduleCreateRequest request) {
Long id = scheduleService.createSchedule(
request.submissionType(),
request.title(),
request.content(),
request.startDate(),
request.endDate()
);
return SchedulePersistResponse.from(id);
}
🤖 Prompt for AI Agents
In
aics-admin/src/main/java/kgu/developers/admin/schedule/application/ScheduleAdminFacade.java
around lines 21 to 30, the createSchedule method performs a write operation but
is missing a transactional annotation; add @Transactional to the method (or
annotate the class if appropriate) and import
org.springframework.transaction.annotation.Transactional so the operation is
executed within a Spring-managed transaction and will roll back on exceptions.


@Transactional
public void updateSchedule(Long scheduleId, ScheduleUpdateRequest request) {
Schedule schedule = scheduleQueryService.getScheduleManagement(scheduleId);
scheduleService.updateSchedule(
schedule,
request.submissionType(),
request.title(),
request.startDate(),
request.endDate()
);
}
@Transactional
public void updateScheduleContent(SubmissionType submissionType, ScheduleContentUpdateRequest request) {
Schedule schedule =scheduleQueryService.getBySubmissionType(submissionType);
scheduleService.updateScheduleContent(schedule,request.content());
}

public void deleteSchedule(Long scheduleId) {
scheduleService.deleteSchedule(scheduleId);
}
Comment on lines +49 to +51
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

삭제 메서드에 트랜잭션 어노테이션이 누락되었습니다.

deleteSchedule 메서드는 데이터를 삭제하는 쓰기 작업이므로 @Transactional 어노테이션이 필요합니다.

다음 diff를 적용하세요:

+    @Transactional
     public void deleteSchedule(Long scheduleId) {
         scheduleService.deleteSchedule(scheduleId);
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public void deleteSchedule(Long scheduleId) {
scheduleService.deleteSchedule(scheduleId);
}
@Transactional
public void deleteSchedule(Long scheduleId) {
scheduleService.deleteSchedule(scheduleId);
}
🤖 Prompt for AI Agents
In
aics-admin/src/main/java/kgu/developers/admin/schedule/application/ScheduleAdminFacade.java
around lines 49-51, the deleteSchedule method performs a write/delete operation
but lacks the @Transactional annotation; add @Transactional to the method (or
the class if preferred) and import
org.springframework.transaction.annotation.Transactional so the delete runs
inside a transaction and rolls back on failure.

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
package kgu.developers.admin.schedule.presentation;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Positive;
import kgu.developers.admin.schedule.presentation.request.ScheduleContentUpdateRequest;
import kgu.developers.admin.schedule.presentation.request.ScheduleCreateRequest;
import kgu.developers.admin.schedule.presentation.request.ScheduleUpdateRequest;
import kgu.developers.admin.schedule.presentation.response.SchedulePersistResponse;
import kgu.developers.domain.schedule.domain.SubmissionType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;


@Tag(name = "Schedule", description = "일정 관리 API")
public interface ScheduleAdminController {

@Operation(summary = "일정 생성 API", description = """
- Description : 이 API는 일정을 생성합니다.
- Assignee : 주윤빈
""")
@ApiResponse(
responseCode = "201",
content = @Content(schema = @Schema(implementation = SchedulePersistResponse.class)))
ResponseEntity<SchedulePersistResponse> createSchedule(
@Parameter(
description = "일정 생성 request 객체 입니다.",
required = true
)@Valid @RequestBody
ScheduleCreateRequest request
);

@Operation(summary = "일정 수정 API", description = """
- Description : 이 API는 일정을 수정합니다.
- Assignee : 주윤빈
""")
@ApiResponse(responseCode = "204")
ResponseEntity<Void> updateSchedule(
@Parameter(
description = "이 API는 제출 유형/제목/기간을 수정합니다.",
example = "1",
required = true
)@Positive @PathVariable Long scheduleId,
@Parameter(
description = "일정 수정 request 객체 입니다.",
required = true
)@Valid @RequestBody ScheduleUpdateRequest request
);

@Operation(summary = "유형별 본문 수정 API",description = """
-Description : 이 API는 제출 유형을 기준으로 본문만 수정합니다.
-Assignee : 주윤빈
""")
@ApiResponse(responseCode = "204")
ResponseEntity<Void> updateScheduleContent(
@Parameter(
description = "본문을 수정할 제출 유형입니다.",
example = "MIDTHESIS",
required = true
)@PathVariable SubmissionType submissionType,
@Parameter(description = "본문 수정 request 객체 입니다.",
required = true
)@Valid @RequestBody ScheduleContentUpdateRequest request
);

@Operation(summary = "일정 삭제 API", description = """
- Description : 이 API는 일정을 삭제합니다.
- Assignee : 주윤빈
""")
@ApiResponse(responseCode = "204")
ResponseEntity<Void> deleteSchedule(
@Parameter(
description = "삭제할 일정의 ID 입니다.",
example = "1",
required = true
)@Positive @PathVariable Long scheduleId
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package kgu.developers.admin.schedule.presentation;

import jakarta.validation.Valid;
import jakarta.validation.constraints.Positive;
import kgu.developers.admin.schedule.application.ScheduleAdminFacade;
import kgu.developers.admin.schedule.presentation.request.ScheduleContentUpdateRequest;
import kgu.developers.admin.schedule.presentation.request.ScheduleCreateRequest;
import kgu.developers.admin.schedule.presentation.request.ScheduleUpdateRequest;
import kgu.developers.admin.schedule.presentation.response.SchedulePersistResponse;
import kgu.developers.domain.schedule.domain.SubmissionType;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import static org.springframework.http.HttpStatus.CREATED;

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/admin/schedules")
@PreAuthorize("hasRole('ROLE_ADMIN')")
public class ScheduleAdminControllerImpl implements ScheduleAdminController {
private final ScheduleAdminFacade scheduleAdminFacade;

@Override
@PostMapping
public ResponseEntity<SchedulePersistResponse> createSchedule(
@Valid @RequestBody ScheduleCreateRequest request
){
SchedulePersistResponse response = scheduleAdminFacade.createSchedule(request);
return ResponseEntity.status(CREATED).body(response);
}

@Override
@PatchMapping("/{scheduleId}")
public ResponseEntity<Void> updateSchedule(
@Positive @PathVariable Long scheduleId,
@Valid @RequestBody ScheduleUpdateRequest request
){
scheduleAdminFacade.updateSchedule(scheduleId, request);
return ResponseEntity.noContent().build();
}

@Override
@PatchMapping("/type/{submissionType}/content")
public ResponseEntity<Void> updateScheduleContent(
@PathVariable SubmissionType submissionType,
@Valid @RequestBody ScheduleContentUpdateRequest request
){
scheduleAdminFacade.updateScheduleContent(submissionType, request);
return ResponseEntity.noContent().build();
}
@Override
@DeleteMapping("/{scheduleId}")
public ResponseEntity<Void> deleteSchedule(
@Positive @PathVariable Long scheduleId
){
scheduleAdminFacade.deleteSchedule(scheduleId);
return ResponseEntity.noContent().build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package kgu.developers.admin.schedule.presentation.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;

import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;

public record ScheduleContentUpdateRequest(
@Schema(description = "일정 내용", example = "매학기 개강 후 2주 이내에 신청서를 작성하여 접수해야합니다.",requiredMode = REQUIRED)
@NotBlank
String content
) {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package kgu.developers.admin.schedule.presentation.request;
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import kgu.developers.domain.schedule.domain.SubmissionType;

import java.time.LocalDateTime;

public record ScheduleCreateRequest(
@Schema(description = "제출 유형", example = "SUBMITTED", requiredMode = REQUIRED)
@NotNull SubmissionType submissionType,

@Schema(description = "일정 제목", example = "중간논문 제출 안내",requiredMode = REQUIRED)
@NotBlank @Size(max=100,message = "일정 제목은 100자 이내여야 합니다.") String title,

@Schema(description = "일정 내용", example = "매학기 개강 후 2주 이내에 신청서를 작성하여 접수해야합니다.",requiredMode = REQUIRED)
@NotBlank String content,

@Schema(description = "시작 일시", example = "2025-04-15T00:00:00", requiredMode = REQUIRED)
@NotNull LocalDateTime startDate,

@Schema(description = "종료 일시", example = "2025-12-31T23:59:59", requiredMode = REQUIRED)
@NotNull LocalDateTime endDate
) {
@AssertTrue(message = "종료 일시는 시작 일시 이후여야 합니다.")
public boolean isValidDateRange() {
if (startDate ==null || endDate == null) {
return true;
}
return !endDate.isBefore(startDate);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package kgu.developers.admin.schedule.presentation.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import kgu.developers.domain.schedule.domain.SubmissionType;

import java.time.LocalDateTime;

import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;

public record ScheduleUpdateRequest(
@Schema(description = "제출 유형", example = "SUBMITTED", requiredMode = REQUIRED)
@NotNull
SubmissionType submissionType,

@Schema(description = "일정 제목", example = "중간논문 제출 안내",requiredMode = REQUIRED)
@NotBlank @Size(max=50)
String title,
Comment on lines +16 to +18
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

제목 길이 제한(50 vs 100) 불일치로 인한 업데이트 실패 가능성

  • ScheduleCreateRequest에서는 title@Size(max = 100, …)를 사용하고, 여기 ScheduleUpdateRequest에서는 @Size(max = 50)을 사용하고 있습니다.
  • 이대로라면 길이가 51~100자인 제목으로 생성된 일정은 이후 수정 요청 시(다른 필드만 변경하더라도) 검증 단계에서 막혀 업데이트가 불가능해질 수 있습니다.
  • 생성/수정 모두 동일한 비즈니스 규칙을 의도하셨다면, 두 DTO의 max 값을 맞춰 주는 게 안전해 보입니다(100자로 통일하거나, 반대로 생성 쪽을 50자로 줄이는 등).

예시(생성과 동일하게 100자로 맞추는 경우):

-        @Schema(description = "일정 제목", example = "중간논문 제출 안내",requiredMode = REQUIRED)
-        @NotBlank @Size(max=50)
+        @Schema(description = "일정 제목", example = "중간논문 제출 안내", requiredMode = REQUIRED)
+        @NotBlank @Size(max = 100)
         String title,
  • 그 외 isValidDateRange 구현은 생성 요청 DTO와 동일해 기간 검증 관점에서는 일관성이 있습니다.

Also applies to: 29-35



---

🏁 Script executed:

```shell
#!/bin/bash
# Find ScheduleCreateRequest and ScheduleUpdateRequest files
fd -t f "ScheduleCreateRequest|ScheduleUpdateRequest" --extension java

Length of output: 205


🏁 Script executed:

#!/bin/bash
# Examine ScheduleCreateRequest.java for title field and @Size annotation
rg -n "@Size|title" --type java -B2 -A2 aics-admin/src/main/java/kgu/developers/admin/schedule/presentation/request/ScheduleCreateRequest.java

Length of output: 295


🏁 Script executed:

#!/bin/bash
# Examine full ScheduleUpdateRequest.java to see all constraints and validators
cat aics-admin/src/main/java/kgu/developers/admin/schedule/presentation/request/ScheduleUpdateRequest.java

Length of output: 1227


🏁 Script executed:

#!/bin/bash
# Check for isValidDateRange validator implementations in both files
rg -n "isValidDateRange" --type java aics-admin/src/main/java/kgu/developers/admin/schedule/presentation/request/

Length of output: 299


🏁 Script executed:

#!/bin/bash
# Get full ScheduleCreateRequest to compare isValidDateRange implementation
cat aics-admin/src/main/java/kgu/developers/admin/schedule/presentation/request/ScheduleCreateRequest.java

Length of output: 1373


title 필드의 @Size 제약 불일치로 인한 업데이트 실패 위험

  • ScheduleCreateRequest에서는 title@Size(max = 100)을 사용하고, ScheduleUpdateRequest에서는 @Size(max = 50)을 사용하고 있습니다.
  • 길이가 51~100자인 제목으로 생성된 일정은 이후 수정 요청 시(다른 필드만 변경하더라도) 검증 단계에서 실패하여 업데이트가 불가능해집니다.
  • ScheduleUpdateRequest 라인 17의 @Size(max = 50)@Size(max = 100)으로 변경하여 두 DTO의 비즈니스 규칙을 통일해야 합니다.
         @Schema(description = "일정 제목", example = "중간논문 제출 안내", requiredMode = REQUIRED)
-        @NotBlank @Size(max=50)
+        @NotBlank @Size(max = 100, message = "일정 제목은 100자 이내여야 합니다.")
         String title,

(ScheduleCreateRequest와의 일관성을 위해 에러 메시지도 추가하는 것을 권장합니다.)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@Schema(description = "일정 제목", example = "중간논문 제출 안내",requiredMode = REQUIRED)
@NotBlank @Size(max=50)
String title,
@Schema(description = "일정 제목", example = "중간논문 제출 안내", requiredMode = REQUIRED)
@NotBlank @Size(max = 100, message = "일정 제목은 100자 이내여야 합니다.")
String title,
🤖 Prompt for AI Agents
aics-admin/src/main/java/kgu/developers/admin/schedule/presentation/request/ScheduleUpdateRequest.java
around lines 16 to 18: the title field uses @Size(max = 50) which conflicts with
ScheduleCreateRequest's @Size(max = 100) and will block updates for titles
between 51–100 chars; change @Size(max = 50) to @Size(max = 100) to align DTO
validation rules, and add a clear message attribute to the annotation (e.g.,
message = "제목은 최대 100자까지 가능합니다") to keep error feedback consistent with
ScheduleCreateRequest.



@Schema(description = "시작 일시", example = "2025-04-15T00:00:00", requiredMode = REQUIRED)
@NotNull
LocalDateTime startDate,

@Schema(description = "종료 일시", example = "2025-12-31T23:59:59", requiredMode = REQUIRED)
@NotNull
LocalDateTime endDate
) {
@AssertTrue(message = "종료 일시는 시작 일시 이후여야 합니다.")
public boolean isValidDateRange() {
if (startDate ==null || endDate == null) {
return true;
}
return !endDate.isBefore(startDate);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package kgu.developers.admin.schedule.presentation.response;

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

import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;

@Builder
public record SchedulePersistResponse(
@Schema(description = "일정 id", example = "1", requiredMode = REQUIRED)
Long scheduleId
) {
public static SchedulePersistResponse from(Long scheduleId) {
return SchedulePersistResponse.builder()
.scheduleId(scheduleId)
.build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package kgu.developers.api.schedule.application;

import kgu.developers.domain.schedule.application.command.ScheduleService;
import kgu.developers.domain.schedule.application.query.ScheduleQueryService;
import kgu.developers.domain.schedule.domain.Schedule;
import kgu.developers.domain.schedule.domain.SubmissionType;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Component
@RequiredArgsConstructor
@Transactional(readOnly = true)
public class ScheduleFacade {
private final ScheduleQueryService scheduleQueryService;

public List<Schedule> findAll() {
return scheduleQueryService.getAllScheduleManagements();
}
public Schedule findBySubmissionTyp(SubmissionType submissionType) {
return scheduleQueryService.getBySubmissionType(submissionType);
}
Comment on lines +22 to +24
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

메서드 이름의 오타를 수정하세요.

메서드 이름 findBySubmissionTyp에서 마지막 'e'가 누락되었습니다. 이는 ScheduleControllerImpl의 Line 34에서도 사용되고 있습니다.

다음 diff를 적용하여 수정하세요:

-    public Schedule findBySubmissionTyp(SubmissionType submissionType) {
+    public Schedule findBySubmissionType(SubmissionType submissionType) {
         return scheduleQueryService.getBySubmissionType(submissionType);
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public Schedule findBySubmissionTyp(SubmissionType submissionType) {
return scheduleQueryService.getBySubmissionType(submissionType);
}
public Schedule findBySubmissionType(SubmissionType submissionType) {
return scheduleQueryService.getBySubmissionType(submissionType);
}
🤖 Prompt for AI Agents
In
aics-api/src/main/java/kgu/developers/api/schedule/application/ScheduleFacade.java
around lines 22-24 the method name has a typo: rename the method from
findBySubmissionTyp to findBySubmissionType (add the missing 'e'), keep the
return and body unchanged, and update all call sites (e.g.,
ScheduleControllerImpl line 34) to use the corrected name.


public Schedule findById(Long id) {
return scheduleQueryService.getScheduleManagement(id);
}



}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package kgu.developers.api.schedule.presentation;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import kgu.developers.api.schedule.presentation.response.ScheduleListResponse;
import kgu.developers.api.schedule.presentation.response.ScheduleSummaryResponse;
import kgu.developers.api.schedule.presentation.response.ScheduleTypeContentResponse;
import kgu.developers.domain.schedule.domain.SubmissionType;
import org.springframework.http.ResponseEntity;

@Tag(name = "Schedule", description = "일정관리 API")
public interface ScheduleController {

@Operation(summary = "전체 일정 조회 API", description = """
- Description : 이 API는 모든 일정을 조회합니다.
- Assignee : 주윤빈
""")
@ApiResponse(
responseCode = "200",
content = @Content(schema = @Schema(implementation = ScheduleListResponse.class)))
ResponseEntity<ScheduleListResponse> getScheduleList();

@Operation(summary = "유형별 일정 본문 조회 API", description = """
- Description : 이 API는 제출유형별 본문만 조회합니다.
- Assignee : 주윤빈
""")
@ApiResponse(
responseCode = "200",
content = @Content(schema = @Schema(implementation = ScheduleTypeContentResponse.class)))
ResponseEntity<ScheduleTypeContentResponse> getSchedulesByType(SubmissionType type);

@Operation(summary = "단일 일정 조회 API", description = """
- Description : 이 API는 단일 일정을 조회합니다.
- Assignee : 주윤빈
""")
@ApiResponse(
responseCode = "200",
content = @Content(schema = @Schema(implementation = ScheduleSummaryResponse.class)))
ResponseEntity<ScheduleSummaryResponse> getScheduleById(Long id);
}
Loading
Loading