Skip to content

[week06] 도얏 6주차 미션#27

Merged
si-zero merged 6 commits intomainfrom
week06_doeyat
May 10, 2026
Merged

[week06] 도얏 6주차 미션#27
si-zero merged 6 commits intomainfrom
week06_doeyat

Conversation

@higashiaka
Copy link
Copy Markdown
Contributor

미션 기록 노션 페이지 링크 첨부합니다.
노션링크

@si-zero si-zero self-requested a review May 10, 2026 11:37
Copy link
Copy Markdown
Contributor

@si-zero si-zero left a comment

Choose a reason for hiding this comment

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

이번에 드린 피드백 다음 미션에서 적용해보시는 것을 추천드립니다.
고생하셨습니다!

}

model User {
id Int @id @default(autoincrement())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

도얏님도 동일하게 id 컬럼은 데이터타입을 BigInt 로 하시는게 좋습니다.

실서비스시에 Int 타입의 최대 숫자는 충분히 도달할 수 있는 숫자입니다!

id Int @id @default(autoincrement())
userId Int @map("member_id")
missionId Int @map("mission_id")
status String @db.VarChar(15)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

미션 상태 컬럼은 들어갈 데이터가 정해져있습니다.
이런 상태 관련 컬럼들은 enum 이라는 데이터 타입을 사용하는 것을 추천드립니다..

상태별로 데이터 조회할 때, 같은 카테고리인데 데이터가 다른 값으로 들어가있으면 굉장히 곤란해집니다.

// 가게 존재 여부 검증
const store = await getStoreById(storeId)
if (!store) {
throw makeError('존재하지 않는 가게입니다.', 404)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

해당 에러 던지는 부분 임시로 작성해두신거겠지만, 나중에 서비스 확장성이나 일관성 측면에서 다소 떨어지는 부분이 있습니다.

에러코드를 따로 파일을 분리하고 도메인별로 관리하면 더욱 확장성 있는 서비스 코드가 될 것 같습니다.

Comment on lines +15 to +30
export const createStore = async (data: StoreCreateRequest) => {
const storeData = bodyToStore(data)
const storeId = await addStore(storeData)

const store = await getStoreById(storeId)
if (!store) {
throw makeError('가게 생성 후 조회에 실패했습니다.', 500)
}

return responseFromStore(store as {
id: number
name: string
address: string
region_id: number
})
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

현재 이름이나 지역 정보 같은 필수 정보가 들어가있는지 확인하는 코드가 없습니다.

해당 내용도 추가해주시면 좋을 것 같습니다.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

현재 성공 응답 json 형식이 통일성이 없습니다.
이러면 프론트엔드에서 각 API별로 처리해야해서 비효율적입니다.
성공 JSON 통일하시는 것을 추천드립니다.

@si-zero si-zero merged commit 21e4d2c into main May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants