[Improvement] Device External ID (UUID) 도입 #275

Closed
opened 2026-03-03 03:36:23 +00:00 by seonkyu.kim · 0 comments
Owner

📋 작업 개요

Device 외부 식별자로 UUID(string) 기반의 ExternalDeviceId를 도입한다.
내부 PK(bigint)는 DB 관계에서만 사용하고, 외부 API에는 UUID만 노출한다.

체크리스트

Domain / Infrastructure

  • Device.ExternalDeviceId (string, VARCHAR(36)) 프로퍼티 추가
  • DeviceConfiguration — UNIQUE INDEX (ServiceId, ExternalDeviceId) 추가
  • IDeviceRepositoryGetByExternalIdAndServiceAsync 추가
  • DeviceRepository — 구현

Application / Cache

  • ITokenCacheService — long deviceId → string deviceId (ExternalDeviceId 기준)
  • TokenCacheService — 구현 동기화

DTO

  • Device DTO 10개 — DeviceId long → string (ExternalDeviceId 반환)
  • DeviceRegisterRequestDto — device_id (UUID, Required) 필드 추가
  • Push DTO — UUID string 배열 직렬화 대응

Service / Worker

  • DeviceService — ExternalDeviceId 기준 로직 변경
  • PushService — UUID string 배열 직렬화
  • PushWorker — ExternalDeviceId 기준 파싱
  • DeadTokenCleanupWorker — 캐시 무효화 수정
  • PushSendLogRepository — Device Include 추가

Migration

  • EF Core Migration AddExternalDeviceId 추가

📎 참고 사항

  • Device.Id(bigint, PK)는 유지, ExternalDeviceId만 외부 노출
  • 기존 DB 레코드에 ExternalDeviceId 없으면 다음 등록 요청 시 채워짐
  • 캐시 키 변경으로 배포 후 기존 캐시는 자동 만료됨
## 📋 작업 개요 Device 외부 식별자로 UUID(string) 기반의 ExternalDeviceId를 도입한다. 내부 PK(bigint)는 DB 관계에서만 사용하고, 외부 API에는 UUID만 노출한다. ## ✅ 체크리스트 ### Domain / Infrastructure - [ ] `Device.ExternalDeviceId` (string, VARCHAR(36)) 프로퍼티 추가 - [ ] `DeviceConfiguration` — UNIQUE INDEX (ServiceId, ExternalDeviceId) 추가 - [ ] `IDeviceRepository` — `GetByExternalIdAndServiceAsync` 추가 - [ ] `DeviceRepository` — 구현 ### Application / Cache - [ ] `ITokenCacheService` — long deviceId → string deviceId (ExternalDeviceId 기준) - [ ] `TokenCacheService` — 구현 동기화 ### DTO - [ ] Device DTO 10개 — DeviceId long → string (ExternalDeviceId 반환) - [ ] `DeviceRegisterRequestDto` — device_id (UUID, Required) 필드 추가 - [ ] Push DTO — UUID string 배열 직렬화 대응 ### Service / Worker - [ ] `DeviceService` — ExternalDeviceId 기준 로직 변경 - [ ] `PushService` — UUID string 배열 직렬화 - [ ] `PushWorker` — ExternalDeviceId 기준 파싱 - [ ] `DeadTokenCleanupWorker` — 캐시 무효화 수정 - [ ] `PushSendLogRepository` — Device Include 추가 ### Migration - [ ] EF Core Migration `AddExternalDeviceId` 추가 ## 📎 참고 사항 - Device.Id(bigint, PK)는 유지, ExternalDeviceId만 외부 노출 - 기존 DB 레코드에 ExternalDeviceId 없으면 다음 등록 요청 시 채워짐 - 캐시 키 변경으로 배포 후 기존 캐시는 자동 만료됨
seonkyu.kim added the
Priority
High
Status
In Progress
Type
Improvement
labels 2026-03-03 03:52:43 +00:00
seonkyu.kim self-assigned this 2026-03-03 03:54:02 +00:00
seonkyu.kim added this to the Phase 1: 서비스 도메인 milestone 2026-03-03 03:54:02 +00:00
seonkyu.kim added
Status
Done
and removed
Status
In Progress
labels 2026-03-03 04:03:34 +00:00
Sign in to join this conversation.
No description provided.