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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build/
!**/src/test/**/build/
src/main/resources/static/docs/

src/main/resources/.env
.env

### STS ###
.apt_generated
Expand Down
20 changes: 10 additions & 10 deletions src/docs/asciidoc/admin/location.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ operation::admin/get-cities[snippets='http-request,request-headers,query-paramet

operation::admin/create-city[snippets='http-request,request-headers,request-fields,http-response,response-fields']

Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

AdminManagementControllerTest documents a 도시 이름 수정 endpoint (admin/update-city-name), but this Asciidoc file no longer includes any section/operation that references that snippet. Add a 도시 이름 수정 section (or restore an update section) so the endpoint is included in the generated docs.

Suggested change
[[city-update-name]]
=== 도시 이름 수정
도시의 이름을 수정합니다.
* SUPER_ADMIN 또는 ADMIN 권한이 필요합니다.
operation::admin/update-city-name[snippets='http-request,request-headers,path-parameters,request-fields,http-response,response-fields']

Copilot uses AI. Check for mistakes.
[[city-update]]
=== 도시 수정

도시 정보를 수정합니다.

* SUPER_ADMIN 또는 ADMIN 권한이 필요합니다.

operation::admin/update-city[snippets='http-request,request-headers,path-parameters,request-fields,http-response,response-fields']

[[city-delete]]
=== 도시 삭제

Expand All @@ -60,4 +51,13 @@ operation::admin/delete-city[snippets='http-request,request-headers,path-paramet
* 우선순위는 1 이상이어야 합니다.
* 같은 국가 내에서 우선순위가 중복되지 않도록 자동으로 조정됩니다.

operation::admin/update-city-priority[snippets='http-request,request-headers,path-parameters,query-parameters,http-response,response-fields']
operation::admin/update-city-priority[snippets='http-request,request-headers,path-parameters,query-parameters,http-response,response-fields']

[[city-priority-reset]]
=== 도시 우선순위 초기화

도시의 검색 우선순위를 초기화합니다.

* SUPER_ADMIN 또는 ADMIN 권한이 필요합니다.

operation::admin/reset-city-priority[snippets='http-request,request-headers,path-parameters,http-response,response-fields']
88 changes: 2 additions & 86 deletions src/docs/도메인모델.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Souzip 도메인 모델

## 도메인 모델 만들기

- 듣고 배우기
- '중요한 것'들 찾기 (개념 식별)
- '연결 고리' 찾기 (관계 정의)
Expand All @@ -10,83 +9,17 @@
예시) 클래스 다이어그램
- 이야기 하고 다듬기 (반복)


## Souzip 도메인

---

## 도메인 모델

### 관리자 (Admin)

_Entity_

#### 속성

- `id`: `UUID`
- `username`: 아이디
- `password`: 비밀번호 (암호화)
- `role`: 역할 (SUPER_ADMIN, ADMIN, VIEWER)
- `lastLoginAt`: 마지막 로그인 시간
- `createdAt`: 등록일
- `updatedAt`: 수정일

#### 행위

- `static register(AdminRegisterRequest, PasswordEncoder)`: 관리자 등록
- `login()`: 로그인 시간 업데이트
- `matchesPassword(String, PasswordEncoder)`: 비밀번호 검증

#### 규칙

- 아이디는 2자 이상 20자 이하
- 비밀번호는 8자 이상
- 역할은 필수 (null 불가)
- SUPER_ADMIN은 초대할 수 없음
- 아이디는 중복될 수 없음

#### 관계

- **AdminRefreshToken**: 1:1

---

### 관리자 리프레시 토큰 (AdminRefreshToken)

_Entity_

#### 속성

- `id`: `UUID`
- `adminId`: 관리자 ID
- `token`: 리프레시 토큰 값
- `expiresAt`: 만료일
- `createdAt`: 등록일

#### 행위

- `static create(UUID, String, LocalDateTime)`: 토큰 생성
- `updateToken(String, LocalDateTime)`: 토큰 갱신
- `isExpired()`: 만료 여부 확인

#### 규칙

- 모든 필드는 필수 (null 불가)
- 만료일이 지나면 사용 불가
- 만료 10일 이내이면 자동 갱신
- 유효 기간은 30일

#### 관계

- **Admin**: N:1

---

### 위치 (Location)

_Entity_

#### 속성

- `id`: `Long`
- `name`: 장소명
- `address`: 주소
Expand All @@ -96,25 +29,20 @@ _Entity_
- `updatedAt`: 수정일

#### 행위

- `static create()`: 위치 생성

#### 규칙

- 좌표는 유효한 범위여야 한다. (위도: -90~90, 경도: -180~180)

#### 관계

- **Souvenir**: 직접 참조 없음. Souvenir 생성 시 Location의 정보를 복사하여 사용

---

### 파일 (File)

_Entity_

#### 속성

- `id`: `Long`
- `entityType`: 엔티티 타입
- `entityId`: 엔티티 ID
Expand All @@ -127,17 +55,14 @@ _Entity_
- `updatedAt`: 수정일

#### 행위

- `static register()`: 파일 등록

#### 규칙

- 모든 필드는 필수 (null 불가)
- displayOrder가 지정되지 않으면 자동으로 마지막 순서 + 1로 설정
- 동일한 (entityType, entityId, displayOrder) 조합은 유일해야 함

#### 외부 의존성

- **NCP Object Storage**: 실제 파일 저장소
- 허용 확장자: `.jpg`, `.jpeg`, `.png`, `.gif`, `.webp`
- 최대 파일 크기: 50MB
Expand All @@ -146,11 +71,9 @@ _Entity_
---

### 공지사항 (Notice)

_Entity_

#### 속성

- `id`: `Long`
- `title`: 제목
- `content`: 내용
Expand All @@ -160,37 +83,30 @@ _Entity_
- `updatedAt`: 수정일

#### 행위

- `static register(NoticeRegisterRequest)`: 공지사항 등록
- `update(NoticeUpdateRequest)`: 공지사항 수정 (제목, 내용, 상태)
- `activate()`: 활성화
- `deactivate()`: 비활성화
- `isActive()`: 활성 상태 확인

#### 규칙

- 모든 필드는 필수 (null 불가)
- 관리자만 작성/수정 가능
- 상태는 ACTIVE 또는 INACTIVE

---

### 좌표 (Coordinate)

_Value Object_

#### 속성

- `latitude`: 위도
- `longitude`: 경도

#### 규칙

- 위도는 -90 ~ 90 범위
- 경도는 -180 ~ 180 범위

#### 사용처

- Location
- City
- Souvenir (향후 마이그레이션 예정)
- Souvenir (향후 마이그레이션 예정)
16 changes: 0 additions & 16 deletions src/main/java/com/souzip/adapter/config/AdminProperties.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading