Add manga author to model

This commit is contained in:
Koitharu
2020-02-28 19:45:57 +02:00
parent 3ef6b3a59c
commit 5ecc0ea305
2 changed files with 5 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ data class MangaEntity(
@ColumnInfo(name = "cover_url") val coverUrl: String,
@ColumnInfo(name = "large_cover_url") val largeCoverUrl: String? = null,
@ColumnInfo(name = "state") val state: String? = null,
@ColumnInfo(name = "author") val author: String? = null,
@ColumnInfo(name = "source") val source: String
) {
@@ -31,6 +32,7 @@ data class MangaEntity(
url = this.url,
coverUrl = this.coverUrl,
largeCoverUrl = this.largeCoverUrl,
author = this.author,
source = MangaSource.valueOf(this.source),
tags = tags
)
@@ -46,7 +48,8 @@ data class MangaEntity(
altTitle = manga.altTitle,
rating = manga.rating,
state = manga.state?.name,
title = manga.title
title = manga.title,
author = manga.author
)
}
}

View File

@@ -15,6 +15,7 @@ data class Manga(
val description: String? = null, //HTML
val tags: Set<MangaTag> = emptySet(),
val state: MangaState? = null,
val author: String? = null,
val chapters: List<MangaChapter>? = null,
val source: MangaSource
) : Parcelable {