-
Notifications
You must be signed in to change notification settings - Fork 1
[BE] erd 다이어그램에 맞춘 엔티티 작성 #99
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
base: dev
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @kimhji, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 Pull Request는 ERD 다이어그램에 따라 엔티티 클래스를 작성하고, DB 마이그레이션 관리를 위한 Flyway를 추가하여 데이터베이스 구조를 설정합니다. 또한, Spring Boot 의존성을 수정하고 JDBC 연결을 설정하여 프로젝트의 기반을 마련합니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
ERD에 맞춰 엔티티를 작성하는 PR 잘 보았습니다. 전반적으로 JPA 엔티티와 관계 설정이 잘 되어있습니다. Flyway를 도입하여 데이터베이스 스키마를 관리하는 점도 좋습니다. 다만, 몇 가지 개선할 점들이 보입니다. 특히 gradle.properties에 개인 로컬 경로가 포함된 점, application.properties의 ddl-auto 설정, 그리고 CompetencyType 엔티티의 enum과 DB 스키마 간의 불일치 등은 수정이 필요해 보입니다. 또한, 여러 엔티티 클래스에서 @Setter를 사용하는 것이나 불필요한 import문, 중복된 repository 메소드 등 유지보수성을 높이기 위한 몇 가지 제안 사항들을 리뷰에 남겼습니다. 자세한 내용은 각 파일의 리뷰 코멘트를 확인해주세요.
backend/api/src/main/java/com/yat2/episode/competency/CompetencyType.java
Show resolved
Hide resolved
backend/api/src/main/java/com/2yat/episode/occupation/Occupation.java
Outdated
Show resolved
Hide resolved
backend/api/src/main/java/com/yat2/episode/users/UsersService.java
Outdated
Show resolved
Hide resolved
backend/api/src/main/java/com/2yat/episode/competency/CompetencyType.java
Outdated
Show resolved
Hide resolved
| -- ----------------------------------------------------- | ||
| -- Table `episode_db_v0`.`occupation` | ||
| -- ----------------------------------------------------- | ||
| CREATE TABLE `episode_db_v0`.`occupation` ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ON DELETE NO ACTION | ||
| ON UPDATE NO ACTION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
users 테이블의 job_id 외래 키에 ON DELETE NO ACTION이 설정되어 있습니다. 이는 참조하는 job이 삭제될 때 작업이 실패하도록 합니다. 다른 테이블에서는 ON DELETE CASCADE를 사용하는 등 정책이 일관되지 않습니다. 예를 들어 question 테이블의 job_id는 ON DELETE CASCADE로 설정되어 있습니다. 프로젝트의 요구사항에 맞게 외래 키 제약 조건의 ON DELETE 정책을 일관성 있게 검토하고 수정하는 것이 좋습니다. question2competency_type (lines 86-87) 와 experience2user (lines 129-130) 제약조건도 같은 맥락에서 검토가 필요합니다.
backend/api/src/main/java/com/__yat/episode/EpisodeApplication.java
Outdated
Show resolved
Hide resolved
…eerbootcamp-7th/Team2-Episode into feat/#50/initialize_project
…eerbootcamp-7th/Team2-Episode into feat/#50/initialize_project
…eerbootcamp-7th/Team2-Episode into feat/#50/initialize_project
close #50
목적
erd 다이어그램에 맞게 엔티티 클래스를 작성하여, 이후 도메인 별 분업이 가능하도록 합니다.
작업 내용
Erd 다이어그램 설계
spring boot 의존성 수정
env 환경 설정 기반 jdbc 연결
DB 마이그레이션 관리를 위한 flyway 추가
복합키 및 1:N 관계에 대한 설계 완료
결과
erd 설계에 맞는 엔티티 클래스 작성 완료