시리즈, 시리즈 콘텐츠

- 정렬순서 추가
This commit is contained in:
Klaus 2024-04-30 22:53:01 +09:00
parent 2acf723c86
commit b775781fd7
4 changed files with 6 additions and 1 deletions

View File

@ -64,6 +64,7 @@ class ContentSeriesQueryRepositoryImpl(
return queryFactory
.selectFrom(series)
.where(where)
.orderBy(series.orders.asc(), series.createdAt.asc())
.offset(offset)
.limit(limit)
.fetch()

View File

@ -89,6 +89,7 @@ class ContentSeriesContentQueryRepositoryImpl(
.innerJoin(seriesContent.series, series)
.innerJoin(seriesContent.content, audioContent)
.where(where)
.orderBy(series.orders.asc(), series.createdAt.asc())
.offset(offset)
.limit(limit)
.fetch()

View File

@ -43,7 +43,8 @@ data class Series(
@CollectionTable(name = "series_published_days_of_week", joinColumns = [JoinColumn(name = "series_id")])
val publishedDaysOfWeek: MutableSet<SeriesPublishedDaysOfWeek> = mutableSetOf(),
var isAdult: Boolean = false,
var isActive: Boolean = true
var isActive: Boolean = true,
var orders: Int = 1
) : BaseEntity() {
@OneToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "genre_id", nullable = false)

View File

@ -17,6 +17,8 @@ class SeriesContent {
@GeneratedValue(strategy = GenerationType.IDENTITY)
var id: Long? = null
var orders: Int = 1
var createdAt: LocalDateTime? = null
@ManyToOne(fetch = FetchType.LAZY)