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

행정구역 목록 조회 API 구현 #47

Closed
wants to merge 0 commits into from

Conversation

tinon1004
Copy link
Contributor

@tinon1004 tinon1004 commented Feb 25, 2024

🔥 Related Issue

🏃‍ Task

  • 행정구역 관련 entity 구현
    • 시/도 entity 구현
    • 시/군/구 entity 구현
    • 읍/면/동 entity 구현
  • 행정구역 목록 조회 API 구현
    • 시/도 목록 조회 API 구현
    • 시/군/구 목록 조회 API 구현
    • 읍/면/동 목록 조회 API 구현

📄 Reference

  • None

@tinon1004 tinon1004 added the enhancement New feature or request label Feb 25, 2024
@tinon1004 tinon1004 self-assigned this Feb 25, 2024
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Entity
@Table(name = "adminitrative_area_sido")
public class Sido extends TimeTrackedBaseEntity{
Copy link
Member

@Wo-ogie Wo-ogie Feb 25, 2024

Choose a reason for hiding this comment

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

Suggested change
public class Sido extends TimeTrackedBaseEntity{
public class AdministrativeAreaSido extends TimeTrackedBaseEntity{

좀 더 길어지긴 하겠지만, 구체적인 이름을 사용하는 편이 좋아보입니다.

@AllArgsConstructor(access = AccessLevel.PRIVATE)
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Entity
@Table(name = "adminitrative_area_sido")
Copy link
Member

Choose a reason for hiding this comment

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

s가 빠졌습니다. 오타 수정 부탁드려요.

Comment on lines 24 to 26
@Id
@Column(nullable = false, updatable = false)
private Long id;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@Id
@Column(nullable = false, updatable = false)
private Long id;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="administrative_area_sido_id", nullable = false, updatable = false)
private Long id;
  1. PK 생성 전략은 반드시 IDENTITY로 설정해주세요.
  2. PK 이름은 ERD대로 설정해주세요.

Comment on lines 28 to 30
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private SidoList name;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private SidoList name;
@Column(nullable = false)
private String name;

항목이 많지 않고, 수정될 일이 많지 않을 것으로 보여 enum value를 사용하는 것도 좋아보입니다.
다만, 시/군/구와 읍/면/동의 경우 항목이 많고 수정 소요를 고려하여 DB에서 값을 관리해야 할 것 같습니다. 그래서 시/도 역시 마찬가지로 단순 String으로 정의하고, DB에서 값을 관리하면 어떨까요?

Copy link
Member

Choose a reason for hiding this comment

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

Commit이 "sido 엔티티 작성 및 api 구현"이므로 Emd class는 commit에 포함시키지 않는 것이 적절해 보입니다. 다음부터는 commit에 관련한 파일만 반영하도록 신경써주세요~ 🙂

@Wo-ogie Wo-ogie closed this Feb 27, 2024
@Wo-ogie Wo-ogie force-pushed the feature/#38-administrative-area branch from e1f6337 to 9aa17a3 Compare February 27, 2024 07:47
@Wo-ogie Wo-ogie deleted the feature/#38-administrative-area branch February 27, 2024 07:47
@Wo-ogie
Copy link
Member

Wo-ogie commented Feb 27, 2024

담당 작업자의 git 운영 미숙으로 PR을 닫고 commit 내역을 초기화한다.
후에 다시 commit 작성 및 PR 생성하여 진행하고자 한다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

행정구역 목록 조회 API 구현
2 participants