-
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.
Merge pull request #89 from SWM-M3PRO/develop
v1.1.1
- Loading branch information
Showing
35 changed files
with
1,006 additions
and
39 deletions.
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
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
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
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
46 changes: 46 additions & 0 deletions
46
src/main/java/com/m3pro/groundflip/domain/dto/pixel/ClusteredPixelCount.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,46 @@ | ||
package com.m3pro.groundflip.domain.dto.pixel; | ||
|
||
import com.m3pro.groundflip.enums.RegionLevel; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Schema() | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
@Builder | ||
public class ClusteredPixelCount { | ||
@Schema(description = "지역 ID", example = "1234") | ||
private Long regionId; | ||
|
||
@Schema(description = "지역 이름", example = "홍길동") | ||
private String regionName; | ||
|
||
@Schema(description = "지역별 픽셀 개수", example = "3") | ||
private int count; | ||
|
||
@Schema(description = "지역의 중심 위도", example = "37.6464") | ||
private double latitude; | ||
|
||
@Schema(description = "지역의 중심 경도", example = "127.6897") | ||
private double longitude; | ||
|
||
@Schema(description = "집계 단위", example = "127.6897") | ||
private RegionLevel regionLevel; | ||
|
||
public static ClusteredPixelCount from(Long regionId, String regionName, int count, double latitude, | ||
double longitude, RegionLevel regionLevel) { | ||
return ClusteredPixelCount.builder() | ||
.regionId(regionId) | ||
.regionName(regionName) | ||
.count(count) | ||
.latitude(latitude) | ||
.longitude(longitude) | ||
.regionLevel(regionLevel) | ||
.build(); | ||
} | ||
} |
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
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
13 changes: 13 additions & 0 deletions
13
src/main/java/com/m3pro/groundflip/domain/dto/pixel/RegionInfo.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,13 @@ | ||
package com.m3pro.groundflip.domain.dto.pixel; | ||
|
||
public interface RegionInfo { | ||
Long getRegionId(); | ||
|
||
double getLatitude(); | ||
|
||
double getLongitude(); | ||
|
||
String getName(); | ||
|
||
Integer getCount(); | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/com/m3pro/groundflip/domain/dto/pixel/naverApi/ReverseGeocodingResult.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,22 @@ | ||
package com.m3pro.groundflip.domain.dto.pixel.naverApi; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
@Builder | ||
@Schema(title = "네이버 api json 결과") | ||
public class ReverseGeocodingResult { | ||
@JsonProperty("region") | ||
private String regionName; | ||
|
||
@JsonProperty("region_id") | ||
private Long regionId; | ||
} |
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
47 changes: 47 additions & 0 deletions
47
src/main/java/com/m3pro/groundflip/domain/entity/CompetitionCount.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,47 @@ | ||
package com.m3pro.groundflip.domain.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@Entity | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
@Builder | ||
public class CompetitionCount { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "competition_count_id") | ||
private Long id; | ||
|
||
private Integer individualModeCount; | ||
|
||
private Integer communityModeCount; | ||
|
||
private Integer year; | ||
|
||
private Integer week; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "region_id") | ||
private Region region; | ||
|
||
public void increaseIndividualModeCount() { | ||
this.individualModeCount++; | ||
} | ||
|
||
public void increaseCommunityModeCount() { | ||
this.communityModeCount++; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/main/java/com/m3pro/groundflip/domain/entity/DailyPixel.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,39 @@ | ||
package com.m3pro.groundflip.domain.entity; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@Entity | ||
@Table(name = "daily_pixel") | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
@Builder | ||
public class DailyPixel { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "daily_pixel_id") | ||
private Long id; | ||
|
||
private Integer dailyPixelCount; | ||
|
||
private LocalDateTime createdAt; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "user_id") | ||
private User user; | ||
} |
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
Oops, something went wrong.