-
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.
FEATURE : modify entity model for composite primary key #4
- Loading branch information
1 parent
131f353
commit efe97de
Showing
4 changed files
with
36 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package eom.improve.kafkaboot.model | ||
|
||
import java.io.Serializable | ||
import java.time.LocalDateTime | ||
|
||
data class FilmActor( | ||
val actorId: Int, | ||
val filmId: Int, | ||
val lastUpdate: LocalDateTime | ||
) : Serializable |
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/eom/improve/kafkaboot/model/FilmCategory.kt
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,10 @@ | ||
package eom.improve.kafkaboot.model | ||
|
||
import java.io.Serializable | ||
import java.time.LocalDateTime | ||
|
||
data class FilmCategory( | ||
val filmId: Int, | ||
val categoryId: Int, | ||
val lastUpdate: LocalDateTime | ||
) : Serializable |
9 changes: 8 additions & 1 deletion
9
src/main/kotlin/eom/improve/kafkaboot/repository/FilmActorRepository.kt
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 |
---|---|---|
@@ -1,4 +1,11 @@ | ||
package eom.improve.kafkaboot.repository | ||
|
||
interface FilmActorRepository { | ||
import eom.improve.kafkaboot.model.FilmActor | ||
import org.springframework.data.r2dbc.repository.R2dbcRepository | ||
import reactor.core.publisher.Flux | ||
import reactor.core.publisher.Mono | ||
|
||
interface FilmActorRepository : R2dbcRepository<FilmActor, Int> { | ||
fun findAllByFilmId(filmId: Int) : Flux<FilmActor> | ||
fun deleteByFilmId(filmId: Int) : Mono<Void> | ||
} |
9 changes: 8 additions & 1 deletion
9
src/main/kotlin/eom/improve/kafkaboot/repository/FilmCategoryRepository.kt
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 |
---|---|---|
@@ -1,4 +1,11 @@ | ||
package eom.improve.kafkaboot.repository | ||
|
||
interface FilmCategoryRepository { | ||
import eom.improve.kafkaboot.model.FilmCategory | ||
import org.springframework.data.r2dbc.repository.R2dbcRepository | ||
import reactor.core.publisher.Flux | ||
import reactor.core.publisher.Mono | ||
|
||
interface FilmCategoryRepository : R2dbcRepository<FilmCategory, Int> { | ||
fun findAllByFilmId(filmId: Int) : Flux<FilmCategory> | ||
fun deleteByFilmId(filmId: Int) : Mono<Void> | ||
} |