1
0

feat: 移除多余的表结构

This commit is contained in:
2024-11-04 18:46:12 +08:00
parent 162f9bb569
commit 7574bc899a

View File

@@ -3,7 +3,6 @@ package com.lanyuanxiaoyao.digtal.market
import jakarta.persistence.Column
import jakarta.persistence.Entity
import jakarta.persistence.Id
import java.io.Serializable
import java.util.Date
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.JpaSpecificationExecutor
@@ -40,34 +39,6 @@ interface ArticleRepository : JpaRepository<Article, String>, JpaSpecificationEx
@Query("update Article article set article.pushed = :pushed where article.id = :id")
fun updatePushedById(@Param("id") id: String, @Param("pushed") pushed: Boolean)
@Query("select article.id from Article article")
@Query("select article.id from Article article where article.description is not null and article.subtitle is not null and article.score is not null")
fun findAllId(): List<String>
}
@Entity
class Link(
@Id var hash: String,
var source: String,
var category: String,
)
@Repository
interface LinkRepository : JpaRepository<Link, String> {
@Query("select link.hash from Link link")
fun findAllId(): List<String>
}
data class CategoryId(
val id: String,
val name: String,
) : Serializable
@Entity
class Category(
@Id var id: CategoryId,
var url: String,
var updateTime: Date?,
)
@Repository
interface CategoryRepository : JpaRepository<Category, CategoryId>