-
Notifications
You must be signed in to change notification settings - Fork 2
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 #25 from DAY0522/feature/ranking-log
Feature/ranking log
- Loading branch information
Showing
3 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/java/com/management/web/domain/RankingHistory.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,28 @@ | ||
package com.management.web.domain; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import lombok.Builder; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.sql.Timestamp; | ||
|
||
@Entity | ||
@NoArgsConstructor | ||
public class RankingHistory { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
private String kakaoId; | ||
private Long reward; | ||
private Timestamp date; | ||
|
||
@Builder | ||
public RankingHistory(String kakaoId, Long reward, Timestamp date) { | ||
this.kakaoId = kakaoId; | ||
this.reward = reward; | ||
this.date = date; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/management/web/repository/RankingHistoryRepository.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,8 @@ | ||
package com.management.web.repository; | ||
|
||
import com.management.web.domain.RankingHistory; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface RankingHistoryRepository extends JpaRepository<RankingHistory, Long> { | ||
RankingHistory save(RankingHistory rankingHistory); | ||
} |
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