-
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.
feat: HeatShelter entity, repository 추가
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
src/main/java/seouldata/seoul_backend/domain/heatshelter/domain/entity/HeatShelter.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,36 @@ | ||
package seouldata.seoul_backend.domain.heatshelter.domain.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "an_heat_shelter") | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class HeatShelter { | ||
|
||
@Id @Column(name = "shelter_name") | ||
private String name; | ||
|
||
private String address; | ||
|
||
@Column(name = "lon") | ||
private double longitude; | ||
|
||
@Column(name = "lat") | ||
private double latitude; | ||
|
||
@Builder | ||
public HeatShelter(String name, String address, double longitude, double latitude) { | ||
this.name = name; | ||
this.address = address; | ||
this.longitude = longitude; | ||
this.latitude = latitude; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...a/seouldata/seoul_backend/domain/heatshelter/domain/repository/HeatShelterRepository.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,7 @@ | ||
package seouldata.seoul_backend.domain.heatshelter.domain.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import seouldata.seoul_backend.domain.heatshelter.domain.entity.HeatShelter; | ||
|
||
public interface HeatShelterRepository extends JpaRepository<HeatShelter, String> { | ||
} |