-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: 불필요한 코드 제거 * feat: 공공데이터 API 정보 저장 기능 구현
- Loading branch information
Showing
6 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/contest/collectingbox/module/publicdata/PublicDataApiInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package contest.collectingbox.module.publicdata; | ||
|
||
import contest.collectingbox.module.collectingbox.domain.Tag; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class PublicDataApiInfo { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Column(nullable = false) | ||
private String sido; | ||
|
||
@Column(nullable = false) | ||
private String sigungu; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private Tag tag; | ||
|
||
@Column(nullable = false) | ||
private String callAddress; | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/contest/collectingbox/module/publicdata/PublicDataApiInfoRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package contest.collectingbox.module.publicdata; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface PublicDataApiInfoRepository extends JpaRepository<PublicDataApiInfo, Long> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/contest/collectingbox/module/publicdata/SavePublicDataApiInfoRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package contest.collectingbox.module.publicdata; | ||
|
||
import contest.collectingbox.module.collectingbox.domain.Tag; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
public class SavePublicDataApiInfoRequest { | ||
private String sido; | ||
private String sigungu; | ||
private Tag tag; | ||
private String callAddress; | ||
|
||
public PublicDataApiInfo toEntity() { | ||
return PublicDataApiInfo.builder() | ||
.sido(sido) | ||
.sigungu(sigungu) | ||
.tag(tag) | ||
.callAddress(callAddress) | ||
.build(); | ||
} | ||
} |
Submodule config
updated
from 67411b to 084c55