-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 운영진 관리 기능 구현 완료 #648
Open
SongJaeHoonn
wants to merge
14
commits into
develop
Choose a base branch
from
feat/#642
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+665
−7
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3b54855
feat(ExecutiveJpaEntity): 엔티티 설계
SongJaeHoonn b9ec0ff
feat(ExecutiveRegisterService): 운영진 등록 기능 구현
SongJaeHoonn b0e862a
feat(File): 운영진 사진 업로드 API 구현
SongJaeHoonn 2bd8be6
feat(ExecutiveRetrieve): 운영진 정보 조회 기능 구현
SongJaeHoonn 4c3c9aa
feat(Executive): 운영진 수정, 삭제 기능 구현
SongJaeHoonn ce80cc1
feat(ExecutiveRegisterService): 운영진 수정시 검증 로직 추가 작성
SongJaeHoonn 2d1be29
refactor(ExecutiveRegisterController): 어노테이션 추가
SongJaeHoonn 99186a3
Merge branch 'develop' into feat/#642
SongJaeHoonn d62fc19
refactor(Executive): ExecutivePosition을 기존의 Position 엔티티와 연계
SongJaeHoonn 7e6852f
refactor(Executive): id를 executiveId로 변경 및 로깅 메시지 변경
SongJaeHoonn 0803dd7
refactor(FileService): 줄바꿈 변경
SongJaeHoonn 2a59ac3
refactor(Executive): 관심분야 변수명 변경
SongJaeHoonn 9be32fc
refactor(ExecutivePosition): enum 삭제
SongJaeHoonn 649310b
refactor(messages): 검증 메시지 프로퍼티 변경
SongJaeHoonn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...lab/api/domain/memberManagement/executive/adapter/in/web/ExecutiveRegisterController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package page.clab.api.domain.memberManagement.executive.adapter.in.web; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.security.access.prepost.PreAuthorize; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import page.clab.api.domain.memberManagement.executive.application.dto.request.ExecutiveRequestDto; | ||
import page.clab.api.domain.memberManagement.executive.application.port.in.RegisterExecutiveUseCase; | ||
import page.clab.api.global.common.dto.ApiResponse; | ||
|
||
@RestController | ||
@RequestMapping("/api/v1/executive") | ||
@RequiredArgsConstructor | ||
@Tag(name = "Member Management - Executive", description = "운영진") | ||
public class ExecutiveRegisterController { | ||
|
||
private final RegisterExecutiveUseCase registerExecutiveUseCase; | ||
|
||
@Operation(summary = "[A] 운영진 등록", description = "ROLE_ADMIN 이상의 권한이 필요함") | ||
@PreAuthorize("hasRole('ADMIN')") | ||
@PostMapping("") | ||
public ApiResponse<String> registerExecutive( | ||
@Valid @RequestBody ExecutiveRequestDto requestDto | ||
) { | ||
String id = registerExecutiveUseCase.registerExecutive(requestDto); | ||
return ApiResponse.success(id); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
.../clab/api/domain/memberManagement/executive/adapter/in/web/ExecutiveRemoveController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package page.clab.api.domain.memberManagement.executive.adapter.in.web; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.security.access.prepost.PreAuthorize; | ||
import org.springframework.web.bind.annotation.DeleteMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import page.clab.api.domain.memberManagement.executive.application.port.in.RemoveExecutiveUseCase; | ||
import page.clab.api.global.common.dto.ApiResponse; | ||
|
||
@RestController | ||
@RequestMapping("/api/v1/executive") | ||
@RequiredArgsConstructor | ||
@Tag(name = "Member Management - Executive", description = "운영진") | ||
public class ExecutiveRemoveController { | ||
|
||
private final RemoveExecutiveUseCase removeExecutiveUseCase; | ||
|
||
@Operation(summary = "[A] 운영진 정보 삭제", description = "ROLE_ADMIN 이상의 권한이 필요함") | ||
@PreAuthorize("hasRole('ADMIN')") | ||
@DeleteMapping("/{executiveId}") | ||
public ApiResponse<String> removeMember( | ||
@PathVariable(name = "executiveId") String executiveId | ||
) { | ||
String id = removeExecutiveUseCase.removeExecutive(executiveId); | ||
return ApiResponse.success(id); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...ab/api/domain/memberManagement/executive/adapter/in/web/ExecutiveRetrievalController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package page.clab.api.domain.memberManagement.executive.adapter.in.web; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import java.util.List; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.security.access.prepost.PreAuthorize; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import page.clab.api.domain.memberManagement.executive.application.dto.response.ExecutiveResponseDto; | ||
import page.clab.api.domain.memberManagement.executive.application.port.in.RetrieveExecutiveUseCase; | ||
import page.clab.api.global.common.dto.ApiResponse; | ||
|
||
@RestController | ||
@RequestMapping("/api/v1/executive") | ||
@RequiredArgsConstructor | ||
@Tag(name = "Member Management - Executive", description = "운영진") | ||
public class ExecutiveRetrievalController { | ||
|
||
private final RetrieveExecutiveUseCase retrieveExecutiveUseCase; | ||
|
||
@Operation(summary = "[G] 운영진 정보 조회", description = "ROLE_GUEST 이상의 권한이 필요함") | ||
@PreAuthorize("hasRole('GUEST')") | ||
@GetMapping("") | ||
public ApiResponse<List<ExecutiveResponseDto>> retrieveExecutives() { | ||
List<ExecutiveResponseDto> executives = retrieveExecutiveUseCase.retrieveExecutives(); | ||
return ApiResponse.success(executives); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
.../clab/api/domain/memberManagement/executive/adapter/in/web/ExecutiveUpdateController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package page.clab.api.domain.memberManagement.executive.adapter.in.web; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.security.access.prepost.PreAuthorize; | ||
import org.springframework.web.bind.annotation.PatchMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import page.clab.api.domain.memberManagement.executive.application.dto.request.ExecutiveUpdateRequestDto; | ||
import page.clab.api.domain.memberManagement.executive.application.port.in.UpdateExecutiveUseCase; | ||
import page.clab.api.global.common.dto.ApiResponse; | ||
|
||
@RestController | ||
@RequestMapping("/api/v1/executive") | ||
@RequiredArgsConstructor | ||
@Tag(name = "Member Management - Executive", description = "운영진") | ||
public class ExecutiveUpdateController { | ||
|
||
private final UpdateExecutiveUseCase updateExecutiveUseCase; | ||
|
||
@Operation(summary = "[A] 운영진 정보 수정", description = "ROLE_ADMIN 이상의 권한이 필요함") | ||
@PreAuthorize("hasRole('ADMIN')") | ||
@PatchMapping("/{executiveId}") | ||
public ApiResponse<String> updateExecutive( | ||
@PathVariable(name = "executiveId") String executiveId, | ||
@RequestBody ExecutiveUpdateRequestDto requestDto | ||
) { | ||
String id = updateExecutiveUseCase.updateExecutive(executiveId, requestDto); | ||
return ApiResponse.success(id); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...lab/api/domain/memberManagement/executive/adapter/out/persistence/ExecutiveJpaEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package page.clab.api.domain.memberManagement.executive.adapter.out.persistence; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import jakarta.validation.constraints.Email; | ||
import jakarta.validation.constraints.Size; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import org.hibernate.annotations.SQLDelete; | ||
import org.hibernate.annotations.SQLRestriction; | ||
import page.clab.api.global.common.domain.BaseEntity; | ||
|
||
@Entity | ||
@Table(name = "executive") | ||
@Getter | ||
@Setter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@SQLDelete(sql = "UPDATE executive SET is_deleted = true WHERE id = ?") | ||
@SQLRestriction("is_deleted = false") | ||
public class ExecutiveJpaEntity extends BaseEntity { | ||
|
||
@Id | ||
@Column(nullable = false, updatable = false, unique = true) | ||
@Size(min = 9, max = 9, message = "{size.executive.id}") | ||
private String id; | ||
|
||
@Column(nullable = false) | ||
@Size(min = 1, max = 10, message = "{size.executive.name}") | ||
private String name; | ||
|
||
@Column(nullable = false) | ||
@Email(message = "{email.executive.email}") | ||
@Size(min = 1, message = "{size.executive.email}") | ||
private String email; | ||
|
||
@Column(nullable = false) | ||
private String interests; | ||
|
||
private String imageUrl; | ||
|
||
@Column(name = "is_deleted", nullable = false) | ||
private Boolean isDeleted; | ||
} |
12 changes: 12 additions & 0 deletions
12
...e/clab/api/domain/memberManagement/executive/adapter/out/persistence/ExecutiveMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package page.clab.api.domain.memberManagement.executive.adapter.out.persistence; | ||
|
||
import org.mapstruct.Mapper; | ||
import page.clab.api.domain.memberManagement.executive.domain.Executive; | ||
|
||
@Mapper(componentModel = "spring") | ||
public interface ExecutiveMapper { | ||
|
||
ExecutiveJpaEntity toEntity(Executive executive); | ||
|
||
Executive toDomain(ExecutiveJpaEntity jpaEntity); | ||
} |
56 changes: 56 additions & 0 deletions
56
...omain/memberManagement/executive/adapter/out/persistence/ExecutivePersistenceAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package page.clab.api.domain.memberManagement.executive.adapter.out.persistence; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Component; | ||
import page.clab.api.domain.memberManagement.executive.application.port.out.RegisterExecutivePort; | ||
import page.clab.api.domain.memberManagement.executive.application.port.out.RetrieveExecutivePort; | ||
import page.clab.api.domain.memberManagement.executive.application.port.out.UpdateExecutivePort; | ||
import page.clab.api.domain.memberManagement.executive.domain.Executive; | ||
import page.clab.api.global.exception.NotFoundException; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class ExecutivePersistenceAdapter implements | ||
RegisterExecutivePort, | ||
RetrieveExecutivePort, | ||
UpdateExecutivePort { | ||
|
||
private final ExecutiveMapper executiveMapper; | ||
private final ExecutiveRepository executiveRepository; | ||
|
||
@Override | ||
public Executive save(Executive executive) { | ||
ExecutiveJpaEntity jpaEntity = executiveMapper.toEntity(executive); | ||
ExecutiveJpaEntity savedEntity = executiveRepository.save(jpaEntity); | ||
return executiveMapper.toDomain(savedEntity); | ||
} | ||
|
||
@Override | ||
public Executive update(Executive executive) { | ||
ExecutiveJpaEntity jpaEntity = executiveMapper.toEntity(executive); | ||
ExecutiveJpaEntity savedEntity = executiveRepository.save(jpaEntity); | ||
return executiveMapper.toDomain(savedEntity); | ||
} | ||
|
||
@Override | ||
public List<Executive> findAll() { | ||
List<ExecutiveJpaEntity> jpaEntities = executiveRepository.findAll(); | ||
return jpaEntities.stream() | ||
.map(executiveMapper::toDomain) | ||
.collect(Collectors.toList()); | ||
} | ||
|
||
@Override | ||
public Executive getById(String executiveId) { | ||
ExecutiveJpaEntity jpaEntity = executiveRepository.findById(executiveId) | ||
.orElseThrow(() -> new NotFoundException("[Executive] id: " + executiveId + "에 해당하는 운영진이 존재하지 않습니다.")); | ||
return executiveMapper.toDomain(jpaEntity); | ||
} | ||
|
||
@Override | ||
public Boolean existsById(String executiveId) { | ||
return executiveRepository.existsById(executiveId); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...ab/api/domain/memberManagement/executive/adapter/out/persistence/ExecutiveRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package page.clab.api.domain.memberManagement.executive.adapter.out.persistence; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface ExecutiveRepository extends JpaRepository<ExecutiveJpaEntity, String> { | ||
} |
32 changes: 32 additions & 0 deletions
32
...clab/api/domain/memberManagement/executive/application/dto/mapper/ExecutiveDtoMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package page.clab.api.domain.memberManagement.executive.application.dto.mapper; | ||
|
||
import org.springframework.stereotype.Component; | ||
import page.clab.api.domain.memberManagement.executive.application.dto.request.ExecutiveRequestDto; | ||
import page.clab.api.domain.memberManagement.executive.application.dto.response.ExecutiveResponseDto; | ||
import page.clab.api.domain.memberManagement.executive.domain.Executive; | ||
|
||
@Component | ||
public class ExecutiveDtoMapper { | ||
|
||
public Executive fromDto(ExecutiveRequestDto requestDto) { | ||
return Executive.builder() | ||
.id(requestDto.getExecutiveId()) | ||
.name(requestDto.getName()) | ||
.email(requestDto.getEmail()) | ||
.interests(requestDto.getInterests()) | ||
.imageUrl(requestDto.getImageUrl()) | ||
.isDeleted(false) | ||
.build(); | ||
} | ||
|
||
public ExecutiveResponseDto toDto(Executive executive, String position) { | ||
return ExecutiveResponseDto.builder() | ||
.executiveId(executive.getId()) | ||
.name(executive.getName()) | ||
.email(executive.getEmail()) | ||
.interests(executive.getInterests()) | ||
.position(position) | ||
.imageUrl(executive.getImageUrl()) | ||
.build(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...ab/api/domain/memberManagement/executive/application/dto/request/ExecutiveRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,30 @@ | ||||||
package page.clab.api.domain.memberManagement.executive.application.dto.request; | ||||||
|
||||||
import io.swagger.v3.oas.annotations.media.Schema; | ||||||
import jakarta.validation.constraints.NotNull; | ||||||
import lombok.Getter; | ||||||
import lombok.Setter; | ||||||
|
||||||
@Getter | ||||||
@Setter | ||||||
public class ExecutiveRequestDto { | ||||||
|
||||||
@NotNull(message = "{notNull.executive.executiveId}") | ||||||
@Schema(description = "학번", example = "202310000") | ||||||
private String executiveId; | ||||||
|
||||||
@NotNull(message = "{notNull.executive.name}") | ||||||
@Schema(description = "이름", example = "홍길동") | ||||||
private String name; | ||||||
|
||||||
@NotNull(message = "{notNull.executive.email}") | ||||||
@Schema(description = "이메일", example = "[email protected]") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a typo in the email example: "[email protected]" should be "[email protected]".
Suggested change
Copilot is powered by AI, so mistakes are possible. Review output carefully before use. |
||||||
private String email; | ||||||
|
||||||
@NotNull(message = "{notNull.executive.interests}") | ||||||
@Schema(description = "분야", example = "Back-End") | ||||||
private String interests; | ||||||
|
||||||
@Schema(description = "프로필 이미지", example = "https://www.clab.page/assets/dongmin-860f3a1e.jpeg") | ||||||
private String imageUrl; | ||||||
} |
22 changes: 22 additions & 0 deletions
22
.../domain/memberManagement/executive/application/dto/request/ExecutiveUpdateRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package page.clab.api.domain.memberManagement.executive.application.dto.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class ExecutiveUpdateRequestDto { | ||
|
||
@Schema(description = "이름", example = "홍길동") | ||
private String name; | ||
|
||
@Schema(description = "이메일", example = "[email protected]") | ||
private String email; | ||
|
||
@Schema(description = "분야", example = "Back-End") | ||
private String interests; | ||
|
||
@Schema(description = "프로필 이미지", example = "https://www.clab.page/assets/dongmin-860f3a1e.jpeg") | ||
private String imageUrl; | ||
} |
16 changes: 16 additions & 0 deletions
16
.../api/domain/memberManagement/executive/application/dto/response/ExecutiveResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package page.clab.api.domain.memberManagement.executive.application.dto.response; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
public class ExecutiveResponseDto { | ||
|
||
private String executiveId; | ||
private String name; | ||
private String email; | ||
private String interests; | ||
private String position; | ||
private String imageUrl; | ||
} |
8 changes: 8 additions & 0 deletions
8
...main/memberManagement/executive/application/exception/ExecutiveRegistrationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package page.clab.api.domain.memberManagement.executive.application.exception; | ||
|
||
public class ExecutiveRegistrationException extends RuntimeException { | ||
|
||
public ExecutiveRegistrationException(String message) { | ||
super(message); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...b/api/domain/memberManagement/executive/application/port/in/RegisterExecutiveUseCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package page.clab.api.domain.memberManagement.executive.application.port.in; | ||
|
||
import page.clab.api.domain.memberManagement.executive.application.dto.request.ExecutiveRequestDto; | ||
|
||
public interface RegisterExecutiveUseCase { | ||
String registerExecutive(ExecutiveRequestDto requestDto); | ||
} |
5 changes: 5 additions & 0 deletions
5
...lab/api/domain/memberManagement/executive/application/port/in/RemoveExecutiveUseCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package page.clab.api.domain.memberManagement.executive.application.port.in; | ||
|
||
public interface RemoveExecutiveUseCase { | ||
String removeExecutive(String executiveId); | ||
} |
8 changes: 8 additions & 0 deletions
8
...b/api/domain/memberManagement/executive/application/port/in/RetrieveExecutiveUseCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package page.clab.api.domain.memberManagement.executive.application.port.in; | ||
|
||
import java.util.List; | ||
import page.clab.api.domain.memberManagement.executive.application.dto.response.ExecutiveResponseDto; | ||
|
||
public interface RetrieveExecutiveUseCase { | ||
List<ExecutiveResponseDto> retrieveExecutives(); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isDeleted
필드를 사용하는 경우 언제 소프트 딜리트가 되었는지 확인할 수 있는 수단이 되기 때문에deletedAt
필드도 함께 사용하는 것이 좋아보여요!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deletedAt
을 추가함으로써 삭제된지 오래된 데이터들을 영구 삭제하거나, 혹시라도 복구할 때 삭제 시점을 보고 복구하기 위함인가요??boardEmoji
를 제외한 다른 도메인들에는deletedAt
이 없어서 질문드립니다!deletedAt
을 추가하는 도메인에 대한 특이사항이 있을까요?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 현재로서는
updatedAt
필드만으로도 삭제 시점을 충분히 관리할 수 있다고 생각해요. 다만,deletedAt
필드를 추가하게 된다면, 다른 소프트 삭제를 사용하는 테이블에도 동일하게 적용하여 일관성을 유지하는 것이 적절하다고 판단돼요.