Skip to content

Commit

Permalink
[Feat]: Novel.episodeCount 컬럼 Long->Int로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
bayy1216 committed Aug 23, 2024
1 parent ee5a598 commit c806c08
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/com/reditus/novelcia/domain/novel/Novel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Novel(
var alarmCount: Long,

@Column(nullable = false)
var episodeCount: Long,
var episodeCount: Int,

@Column(nullable = false)
var isDeleted: Boolean,
Expand Down Expand Up @@ -176,7 +176,7 @@ class Novel(
likeCount: Long = 0,
favoriteCount: Long = 0,
alarmCount: Long = 0,
episodeCount: Long = 0,
episodeCount: Int = 0,
isDeleted: Boolean = false,
readAuthority: ReadAuthority = ReadAuthority.FREE,
) = Novel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class NovelModel {
val likeCount: Long,
val favoriteCount: Long,
val alarmCount: Long,
val episodeCount: Long,
val episodeCount: Int,
) {
companion object {
fun from(novel: Novel): TxScope.() -> Main = {
Expand Down Expand Up @@ -43,7 +43,7 @@ class NovelModel {
val viewCount: Long,
val likeCount: Long,
val favoriteCount: Long,
val episodeCount: Long,
val episodeCount: Int,

val species: List<SpeciesModel>,
val tags: List<TagModel>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class NovelRes {
val title: String,
val thumbnailImageUrl: String?,
val favoriteCount: Long,
val episodeCount: Long,
val episodeCount: Int,
){
companion object{
fun from(novel: NovelModel.Main) = Meta(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE novel
MODIFY COLUMN episode_count INT NOT NULL;

0 comments on commit c806c08

Please sign in to comment.