diff --git a/src/main/kotlin/eom/improve/kafkaboot/model/FilmActor.kt b/src/main/kotlin/eom/improve/kafkaboot/model/FilmActor.kt new file mode 100644 index 0000000..ec11886 --- /dev/null +++ b/src/main/kotlin/eom/improve/kafkaboot/model/FilmActor.kt @@ -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 \ No newline at end of file diff --git a/src/main/kotlin/eom/improve/kafkaboot/model/FilmCategory.kt b/src/main/kotlin/eom/improve/kafkaboot/model/FilmCategory.kt new file mode 100644 index 0000000..5614e38 --- /dev/null +++ b/src/main/kotlin/eom/improve/kafkaboot/model/FilmCategory.kt @@ -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 \ No newline at end of file diff --git a/src/main/kotlin/eom/improve/kafkaboot/repository/FilmActorRepository.kt b/src/main/kotlin/eom/improve/kafkaboot/repository/FilmActorRepository.kt index e058a5c..fb790e6 100644 --- a/src/main/kotlin/eom/improve/kafkaboot/repository/FilmActorRepository.kt +++ b/src/main/kotlin/eom/improve/kafkaboot/repository/FilmActorRepository.kt @@ -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 { + fun findAllByFilmId(filmId: Int) : Flux + fun deleteByFilmId(filmId: Int) : Mono } diff --git a/src/main/kotlin/eom/improve/kafkaboot/repository/FilmCategoryRepository.kt b/src/main/kotlin/eom/improve/kafkaboot/repository/FilmCategoryRepository.kt index 7778aa5..8170753 100644 --- a/src/main/kotlin/eom/improve/kafkaboot/repository/FilmCategoryRepository.kt +++ b/src/main/kotlin/eom/improve/kafkaboot/repository/FilmCategoryRepository.kt @@ -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 { + fun findAllByFilmId(filmId: Int) : Flux + fun deleteByFilmId(filmId: Int) : Mono }