-
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.
- Loading branch information
Showing
8 changed files
with
124 additions
and
23 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
28 changes: 28 additions & 0 deletions
28
src/main/java/site/billbill/apiserver/model/post/SearchKeywordStatsJpaEntity.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 site.billbill.apiserver.model.post; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
import site.billbill.apiserver.model.BaseTime; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Entity | ||
@Table(name = "search_keyword_stats") | ||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class SearchKeywordStatsJpaEntity extends BaseTime { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name="keyword_seq") | ||
private long id; | ||
|
||
@Column(name="keyword",nullable = true) | ||
private String keyword; | ||
@Column(name = "search_count", nullable = false) | ||
private int searchCount; | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/site/billbill/apiserver/model/user/UserSearchHistJpaEntity.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 site.billbill.apiserver.model.user; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
import org.hibernate.annotations.DynamicUpdate; | ||
import site.billbill.apiserver.common.converter.BooleanConverter; | ||
import site.billbill.apiserver.model.BaseTime; | ||
@DynamicUpdate | ||
@Entity | ||
@Table(name = "users_search_hist") | ||
@Getter | ||
@Setter | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class UserSearchHistJpaEntity extends BaseTime { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "search_seq", nullable = false) | ||
private String searchId; | ||
@Column(name = "keyword", nullable = true) | ||
private String keyword; | ||
@Column(name = "del_yn", nullable = false) | ||
@Convert(converter = BooleanConverter.class) | ||
private boolean delYn; | ||
@ManyToOne | ||
@JoinColumn(name="user_id") | ||
private UserJpaEntity user; | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
...main/java/site/billbill/apiserver/repository/borrowPosts/SearchKeywordStatRepository.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 site.billbill.apiserver.repository.borrowPosts; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import site.billbill.apiserver.model.post.SearchKeywordStatsJpaEntity; | ||
|
||
public interface SearchKeywordStatRepository extends JpaRepository<SearchKeywordStatsJpaEntity, Long> { | ||
SearchKeywordStatsJpaEntity findByKeyword(String keyword); | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/site/billbill/apiserver/repository/user/UserSearchHistRepository.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 site.billbill.apiserver.repository.user; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import site.billbill.apiserver.model.user.UserSearchHistJpaEntity; | ||
|
||
|
||
public interface UserSearchHistRepository extends JpaRepository<UserSearchHistJpaEntity, String> { | ||
} |