Merge pull request '시리즈, 시리즈 콘텐츠' (#170) from test into main
Reviewed-on: #170
This commit is contained in:
commit
36a82d7f53
|
@ -64,6 +64,7 @@ class ContentSeriesQueryRepositoryImpl(
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.selectFrom(series)
|
.selectFrom(series)
|
||||||
.where(where)
|
.where(where)
|
||||||
|
.orderBy(series.orders.asc(), series.createdAt.asc())
|
||||||
.offset(offset)
|
.offset(offset)
|
||||||
.limit(limit)
|
.limit(limit)
|
||||||
.fetch()
|
.fetch()
|
||||||
|
|
|
@ -89,6 +89,7 @@ class ContentSeriesContentQueryRepositoryImpl(
|
||||||
.innerJoin(seriesContent.series, series)
|
.innerJoin(seriesContent.series, series)
|
||||||
.innerJoin(seriesContent.content, audioContent)
|
.innerJoin(seriesContent.content, audioContent)
|
||||||
.where(where)
|
.where(where)
|
||||||
|
.orderBy(series.orders.asc(), series.createdAt.asc())
|
||||||
.offset(offset)
|
.offset(offset)
|
||||||
.limit(limit)
|
.limit(limit)
|
||||||
.fetch()
|
.fetch()
|
||||||
|
|
|
@ -43,7 +43,8 @@ data class Series(
|
||||||
@CollectionTable(name = "series_published_days_of_week", joinColumns = [JoinColumn(name = "series_id")])
|
@CollectionTable(name = "series_published_days_of_week", joinColumns = [JoinColumn(name = "series_id")])
|
||||||
val publishedDaysOfWeek: MutableSet<SeriesPublishedDaysOfWeek> = mutableSetOf(),
|
val publishedDaysOfWeek: MutableSet<SeriesPublishedDaysOfWeek> = mutableSetOf(),
|
||||||
var isAdult: Boolean = false,
|
var isAdult: Boolean = false,
|
||||||
var isActive: Boolean = true
|
var isActive: Boolean = true,
|
||||||
|
var orders: Int = 1
|
||||||
) : BaseEntity() {
|
) : BaseEntity() {
|
||||||
@OneToOne(fetch = FetchType.EAGER)
|
@OneToOne(fetch = FetchType.EAGER)
|
||||||
@JoinColumn(name = "genre_id", nullable = false)
|
@JoinColumn(name = "genre_id", nullable = false)
|
||||||
|
|
|
@ -17,6 +17,8 @@ class SeriesContent {
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
var id: Long? = null
|
var id: Long? = null
|
||||||
|
|
||||||
|
var orders: Int = 1
|
||||||
|
|
||||||
var createdAt: LocalDateTime? = null
|
var createdAt: LocalDateTime? = null
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
|
Loading…
Reference in New Issue