feat: 서비스 등록 API 구현 (#52) #53

Merged
seonkyu.kim merged 1 commits from feature/#52-service-create into develop 2026-02-10 00:41:52 +00:00
Owner

📋 작업 요약

  • 새로운 서비스(프로젝트)를 등록하는 POST /v1/in/service/create API 구현
  • ServiceCode(NanoID 8자리) 및 API Key(48자 Base64) 자동 생성
  • ServiceName 중복 검사 (에러코드 107)

Closes #52

🛠️ 작업 내용 (Changes)

  • SPMS.Application/DTOs/Service/CreateServiceRequestDto.cs — 요청 DTO (ServiceName, Description)
  • SPMS.Application/DTOs/Service/CreateServiceResponseDto.cs — 응답 DTO (ServiceCode, ApiKey, ApiKeyCreatedAt)
  • SPMS.Application/Interfaces/IServiceManagementService.cs — CreateAsync 메서드 추가
  • SPMS.Application/Services/ServiceManagementService.cs — 서비스 생성 로직 구현 (NanoID, API Key 생성, 중복 검사)
  • SPMS.Domain/Interfaces/IServiceRepository.cs — ServiceNameExistsAsync, ServiceCodeExistsAsync 추가
  • SPMS.Infrastructure/Persistence/Repositories/ServiceRepository.cs — 중복 검사 쿼리 구현
  • SPMS.API/Controllers/ServiceController.cs — POST /v1/in/service/create 엔드포인트 추가

📢 리뷰어 참고 사항 (To Reviewers)

  • API Key는 기존 RefreshApiKeyAsync와 동일한 패턴(36바이트 Base64)으로 생성
  • ServiceCode는 NanoID 방식(a-zA-Z0-9 8자리)으로 생성, 충돌 시 최대 10회 재시도
  • JWT에서 adminId를 추출하여 CreatedBy 필드에 저장

체크리스트 (Self Checklist)

  • 빌드(Build)가 성공적으로 수행되었는가?
  • 모든 단위 테스트(Unit Test)를 통과하였는가?
  • 불필요한 로그나 주석을 제거하였는가?
  • 컨벤션(Clean Architecture, Naming)을 준수하였는가?
  • 기밀 정보(비밀번호, 키 등)가 하드코딩 되어있지 않은가?

📸 스크린샷 / 테스트 로그 (Screenshots/Logs)

빌드했습니다.
    경고 0개
    오류 0개
## 📋 작업 요약 - 새로운 서비스(프로젝트)를 등록하는 POST /v1/in/service/create API 구현 - ServiceCode(NanoID 8자리) 및 API Key(48자 Base64) 자동 생성 - ServiceName 중복 검사 (에러코드 107) ## 🔗 관련 이슈 (Related Issues) Closes #52 ## 🛠️ 작업 내용 (Changes) - [x] `SPMS.Application/DTOs/Service/CreateServiceRequestDto.cs` — 요청 DTO (ServiceName, Description) - [x] `SPMS.Application/DTOs/Service/CreateServiceResponseDto.cs` — 응답 DTO (ServiceCode, ApiKey, ApiKeyCreatedAt) - [x] `SPMS.Application/Interfaces/IServiceManagementService.cs` — CreateAsync 메서드 추가 - [x] `SPMS.Application/Services/ServiceManagementService.cs` — 서비스 생성 로직 구현 (NanoID, API Key 생성, 중복 검사) - [x] `SPMS.Domain/Interfaces/IServiceRepository.cs` — ServiceNameExistsAsync, ServiceCodeExistsAsync 추가 - [x] `SPMS.Infrastructure/Persistence/Repositories/ServiceRepository.cs` — 중복 검사 쿼리 구현 - [x] `SPMS.API/Controllers/ServiceController.cs` — POST /v1/in/service/create 엔드포인트 추가 ## 📢 리뷰어 참고 사항 (To Reviewers) - API Key는 기존 RefreshApiKeyAsync와 동일한 패턴(36바이트 Base64)으로 생성 - ServiceCode는 NanoID 방식(a-zA-Z0-9 8자리)으로 생성, 충돌 시 최대 10회 재시도 - JWT에서 adminId를 추출하여 CreatedBy 필드에 저장 ## ✅ 체크리스트 (Self Checklist) - [x] 빌드(Build)가 성공적으로 수행되었는가? - [x] 모든 단위 테스트(Unit Test)를 통과하였는가? - [x] 불필요한 로그나 주석을 제거하였는가? - [x] 컨벤션(Clean Architecture, Naming)을 준수하였는가? - [x] 기밀 정보(비밀번호, 키 등)가 하드코딩 되어있지 않은가? ## 📸 스크린샷 / 테스트 로그 (Screenshots/Logs) ``` 빌드했습니다. 경고 0개 오류 0개 ```
seonkyu.kim added 1 commit 2026-02-10 00:39:29 +00:00
seonkyu.kim self-assigned this 2026-02-10 00:39:45 +00:00
seonkyu.kim added this to the Phase 2-1: 인증 & 계정 & 서비스 API milestone 2026-02-10 00:39:46 +00:00
seonkyu.kim added the
Priority
High
Status
In Progress
Type
Feature
labels 2026-02-10 00:39:50 +00:00
seonkyu.kim requested review from Owners 2026-02-10 00:40:05 +00:00
seonkyu.kim merged commit de679f6f7e into develop 2026-02-10 00:41:52 +00:00
seonkyu.kim deleted branch feature/#52-service-create 2026-02-10 00:42:11 +00:00
seonkyu.kim added
Status
Done
and removed
Status
In Progress
labels 2026-02-10 00:42:37 +00:00
Sign in to join this conversation.
No description provided.