|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package wanijo.wanijo2.domain
|
|
|
|
|
|
|
|
|
|
import org.springframework.data.annotation.Id
|
|
|
|
|
import org.springframework.data.domain.Sort
|
|
|
|
|
import org.springframework.data.jdbc.repository.query.Modifying
|
|
|
|
|
import org.springframework.data.jdbc.repository.query.Query
|
|
|
|
|
import org.springframework.data.relational.core.mapping.Table
|
|
|
|
@ -23,6 +24,14 @@ data class Document(
|
|
|
|
|
val dateFields: Set<DateField> = emptySet(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@Table("T_DOCUMENT")
|
|
|
|
|
data class DocumentBrief(
|
|
|
|
|
@Id
|
|
|
|
|
val id: DocumentId,
|
|
|
|
|
val name: DocumentName,
|
|
|
|
|
val updatedAt: ZonedDateTime
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
interface DocumentDao : Repository<Document, DocumentId> {
|
|
|
|
|
fun findAll(): List<Document>
|
|
|
|
|
fun findById(id: DocumentId): Document?
|
|
|
|
@ -68,3 +77,7 @@ interface DocumentDao: Repository<Document, DocumentId> {
|
|
|
|
|
)
|
|
|
|
|
fun delete(documentId: DocumentId)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface DocumentBriefDao : Repository<DocumentBrief, DocumentId> {
|
|
|
|
|
fun findAll(sort: Sort): List<DocumentBrief>
|
|
|
|
|
}
|
|
|
|
|