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: 관담 세부 조회에 에타 링크 추가 #53

Merged
merged 3 commits into from
Feb 8, 2025

Conversation

3Juhwan
Copy link
Member

@3Juhwan 3Juhwan commented Feb 8, 2025

작업 내용

관담 세부 조회에 에타 링크 추가하는 작업을 했어요.

변경된 API 명세

  • 작업한 URL: /api/baskets/{subjectId}
  • 변경된 응답:
{
	"everytimeLectureId": 1234567,
	"eachDepartmentRegisters": [
		{
			"studentBelong": "본교생",
			"registerDepartment":"컴퓨터공학과",
			"eachCount": 10
		},
		{
			"studentBelong": "본교생",
			"registerDepartment":"전자정보통신공학과",
			"eachCount": 4
		}
	]
}

구현 방법

  • Subject 테이블에 everytime_lecture_id 컬럼을 추가했어요.
  • 크롤링한 데이터를 prod 데이터베이스에 반영했어요.
  • Subject Entity에 everytimeLectureId 컬럼을 추가했어요.
  • Basket을 조회할 때 subject도 함께 조회하게 되는데, subject에서 에타 LectureId를 찾아서 Basket 응답에 넣어줬어요.
  • 클라이언트는 응답으로 온 LectureId 앞에 도메인을 붙여서 링크를 걸면 돼요. https://everytime.kr/lecture/view/ + 1234567

고민 지점과 리뷰 포인트

  • 현재는 도메인과 엔티티 사이의 경계가 애매한데요, Subject 도메인에 에타 링크가 들어가는 게 굉장히 어색해요. 과목은 그 자체로 순수하게 보존되어야 하는데, 외부 서비스의 정책이 들어온 거니깐요. 기한이 급하기 때문에 일단은 Subject 도메인에 넣었는데, 추후 개선이 필요할 것 같아요.

Copy link

github-actions bot commented Feb 8, 2025

Test Results

48 tests   48 ✅  6s ⏱️
15 suites   0 💤
15 files     0 ❌

Results for commit 8b8c34a.

@3Juhwan 3Juhwan requested a review from boyekim February 8, 2025 03:17
@3Juhwan 3Juhwan self-assigned this Feb 8, 2025
Copy link
Member

@boyekim boyekim left a comment

Choose a reason for hiding this comment

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

테스트까지 꼼꼼하게 잘 챙겨주셨네여 감사해여
그런데 에타 정보가 따로 엔티티로 찢어지는건 어떤가요???? 현재는 과목이랑 엮는게 조금 힘들 것 같지만 추후에 그런 방법을 생각해봐도 좋을 것 같아여

@3Juhwan
Copy link
Member Author

3Juhwan commented Feb 8, 2025

지금은 개발 기한이 바쁘니, 이슈로 등록하고 지금은 머지할게요!

@3Juhwan 3Juhwan merged commit e2d79e3 into main Feb 8, 2025
3 checks passed
@3Juhwan 3Juhwan deleted the feat/52-add-everytime-link branch February 8, 2025 03:23
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.

관담 세부정보 API에 에브리타임 강의실 링크를 포함한다.
2 participants