Skip to content

Commit

Permalink
Add Media List Contract & Concrete Model #24
Browse files Browse the repository at this point in the history
  • Loading branch information
wax911 committed Aug 22, 2019
1 parent f0eef75 commit a8ffd53
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,35 @@
package co.anitrend.data.model.response.core.medialist

import androidx.room.PrimaryKey
import co.anitrend.data.model.response.core.media.Media
import co.anitrend.data.model.response.core.media.contract.IMedia
import co.anitrend.data.model.response.core.medialist.contract.IMediaList
import co.anitrend.data.model.response.meta.FuzzyDate
import co.anitrend.data.usecase.medialist.attributes.MediaListStatus

/** [MediaList](https://anilist.github.io/ApiV2-GraphQL-Docs/medialist.doc.html)
* List of anime or manga
*
*
*/
data class MediaList(
@PrimaryKey
override val id: Long
override val id: Long,
override val advancedScores: Map<String, String>?,
override val completedAt: FuzzyDate?,
override val createdAt: Long?,
override val customLists: Map<String, String>?,
override val hiddenFromStatusLists: Boolean?,
override val media: Media?,
override val mediaId: Int,
override val notes: String?,
override val priority: Int?,
override val private: Boolean?,
override val progress: Int?,
override val progressVolumes: Int?,
override val repeat: Int?,
override val score: Float?,
override val startedAt: FuzzyDate?,
override val status: MediaListStatus?,
override val updatedAt: Long?,
override val userId: Int
) : IMediaList
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,50 @@
package co.anitrend.data.model.response.core.medialist.contract

import co.anitrend.data.entity.contract.IEntity
import co.anitrend.data.model.response.core.media.contract.IMedia
import co.anitrend.data.model.response.meta.FuzzyDate
import co.anitrend.data.usecase.medialist.attributes.MediaListStatus


/** [MediaList](https://anilist.github.io/ApiV2-GraphQL-Docs/medialist.doc.html)
* MediaList contract for anime or manga
*
*
* @property advancedScores Map of advanced scores with name keys
* @property completedAt When the entry was completed by the user
* @property createdAt When the entry data was created
* @property customLists Map of booleans for which custom lists the entry are in
* @property hiddenFromStatusLists If the entry shown be hidden from non-custom lists
* @property media The media for the list entry
* @property mediaId The id of the media
* @property notes Text notes
* @property priority Priority of planning
* @property private If the entry should only be visible to authenticated user
* @property progress The amount of episodes/chapters consumed by the user
* @property progressVolumes The amount of volumes read by the user
* @property repeat The amount of times the user has rewatched/read the media
* @property score The score of the entry
* @property startedAt When the entry was started by the user
* @property status The watching/reading status
* @property updatedAt When the entry data was last updated
* @property userId The id of the user owner of the list entry
*/
interface IMediaList : IEntity {
val advancedScores: Map<String, String>?
val completedAt: FuzzyDate?
val createdAt: Long?
val customLists: Map<String, String>?
val hiddenFromStatusLists: Boolean?
val media: IMedia?
val mediaId: Int
val notes: String?
val priority: Int?
val private: Boolean?
val progress: Int?
val progressVolumes: Int?
val repeat: Int?
val score: Float?
val startedAt: FuzzyDate?
val status: MediaListStatus?
val updatedAt: Long?
val userId: Int
}

0 comments on commit a8ffd53

Please sign in to comment.