Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] 모델프로필 단건조회 및 생성 api 완성 #21

Merged
merged 8 commits into from
Mar 5, 2024

Conversation

j2noo
Copy link
Contributor

@j2noo j2noo commented Mar 4, 2024

🗃 Issue

🔥 Task

  • createModel, getModel
  • createModelIntroduction, getModelIntroduction은 좀이따 저녁 전까지 올릴게요! 새로 이슈 팔게요

📄 Reference

{
  "modelName": "아이린",
  "birth": "1991-03-29T00:00:00Z",  // 생년월일을 ISO 8601 형식으로 표현한 예시
  "job": "가수",
  "info": "아이린에 대한 정보",
  "agency": "SM Entertainment",
  "aiRate": 0.95
}

위의 데이터로 postman 테스트 했습ㄴ다.

@j2noo j2noo requested review from lsm-del and sominyun March 4, 2024 11:59
@j2noo j2noo self-assigned this Mar 4, 2024
@Override
public ModelResponse getModel(Long modelId) {
Model model = modelRepository.findById(modelId)
.orElseThrow(() -> new RuntimeException("존재하지 않는 아이디"));
Copy link
Member

Choose a reason for hiding this comment

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

customexcetpion 으로 해주세요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

NotFoundExceoptioan 적용완뇨


public record ModelRequest(
@NotNull String modelName,
@NotNull LocalDateTime birth,
Copy link
Member

Choose a reason for hiding this comment

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

LocalDate로 해서 날짜만 표기하는게 좋을것같아요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

대박

Copy link
Contributor

@lsm-del lsm-del left a comment

Choose a reason for hiding this comment

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

수고하셧슴돠!

import java.time.LocalDate;

public record ModelRequest(
@NotNull String modelName,
Copy link
Contributor

Choose a reason for hiding this comment

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

@NotNull 인자 값으로 message 추가하면 좋을 것 같아요

Copy link
Contributor

Choose a reason for hiding this comment

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

프론트 입장에서 어떤 필드를 null 값으로 요청해서 에러가 났는지 알아야 하니깐요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

네ㅔㅇ베ㅔㅂㅇ

@j2noo j2noo merged commit 2ce738e into develop Mar 5, 2024
1 check passed
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.

[feat] 모델 분석 - 모델소개 페이지 api 생성
3 participants