forked from AcaMate/AcaMate_API
[📝] 25.04.03 TO-DO 기록
This commit is contained in:
parent
ff714ed09f
commit
d7a3703e29
56
Diary/25.04.md
Normal file
56
Diary/25.04.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
# 2025년 3월 To-do
|
||||
## 3일 (목)
|
||||
### 1. 전체적인 구조 재 정립
|
||||
1. [ ] Controller, Model, Repository, Service, DTO 확립
|
||||
2. [ ] 확립된 구조에 맞게 폴더 구조 변경 및 네이밍 정의
|
||||
3. [ ] 변경된 구조에 맞게 코드 리팩토링
|
||||
4. [ ] 응답이나 예외에 맞는 일관되게 코드 통일화
|
||||
|
||||
## 리팩토링
|
||||
### 리팩토링의 필요성
|
||||
1. 현재 C,R,S 등 의 폴더를 만들어는 뒀으나 해당 구조에 맞게 작업이 올바르게 되지 않음
|
||||
2. 제대로 구분되지 않다보니 하나의 Controller 에서 다양한 역할과 책임을 맡고 있음
|
||||
3. 그러다보니 명확한 확장과 구조의 파악이 어려움
|
||||
|
||||
### 목표
|
||||
- 책임과 역할에 맞게 명확한 구분을 한다.
|
||||
#### 원칙
|
||||
1. Common, Controller, Model, Repository, Service, DTO 등 역할별 책임에 맞게 계층 분리
|
||||
2. 도메인 중심으로 각 단위별로 묶기
|
||||
|
||||
### 구조 정의
|
||||
```
|
||||
/Controllers
|
||||
└─ /V1
|
||||
└─ /Interfaces
|
||||
└─ I{Domain}.cs
|
||||
└─ {Domain}Contreoller.cs
|
||||
|
||||
/Services
|
||||
└─ /V1
|
||||
└─ /Interfaces
|
||||
└─ I{Domain}Service.cs
|
||||
└─ {Domain}Service.cs
|
||||
|
||||
/Repositories
|
||||
└─ /V1
|
||||
└─ /Interfaces
|
||||
└─ I{Domain}Repository.cs
|
||||
└─ {Domain}Repository.cs
|
||||
|
||||
/Models
|
||||
└─ /Entities
|
||||
└─ {Domain}.cs
|
||||
└─ /DTOs
|
||||
└─ /V1
|
||||
└─ {Domain}Dto.cs
|
||||
|
||||
/Common
|
||||
└─ /{공통기능}
|
||||
└─ {공통기능관련}.cs
|
||||
|
||||
SwaggerConfigure.cs
|
||||
Program.cs
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user