mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	Move more to data and domain modules (#8973)
This commit is contained in:
		| @@ -0,0 +1,3 @@ | ||||
| package tachiyomi.domain.chapter.model | ||||
|  | ||||
| class NoChaptersException : Exception() | ||||
							
								
								
									
										17
									
								
								domain/src/main/java/tachiyomi/domain/track/model/Track.kt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								domain/src/main/java/tachiyomi/domain/track/model/Track.kt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| package tachiyomi.domain.track.model | ||||
|  | ||||
| data class Track( | ||||
|     val id: Long, | ||||
|     val mangaId: Long, | ||||
|     val syncId: Long, | ||||
|     val remoteId: Long, | ||||
|     val libraryId: Long?, | ||||
|     val title: String, | ||||
|     val lastChapterRead: Double, | ||||
|     val totalChapters: Long, | ||||
|     val status: Long, | ||||
|     val score: Float, | ||||
|     val remoteUrl: String, | ||||
|     val startDate: Long, | ||||
|     val finishDate: Long, | ||||
| ) | ||||
| @@ -0,0 +1,21 @@ | ||||
| package tachiyomi.domain.track.repository | ||||
|  | ||||
| import kotlinx.coroutines.flow.Flow | ||||
| import tachiyomi.domain.track.model.Track | ||||
|  | ||||
| interface TrackRepository { | ||||
|  | ||||
|     suspend fun getTrackById(id: Long): Track? | ||||
|  | ||||
|     suspend fun getTracksByMangaId(mangaId: Long): List<Track> | ||||
|  | ||||
|     fun getTracksAsFlow(): Flow<List<Track>> | ||||
|  | ||||
|     fun getTracksByMangaIdAsFlow(mangaId: Long): Flow<List<Track>> | ||||
|  | ||||
|     suspend fun delete(mangaId: Long, syncId: Long) | ||||
|  | ||||
|     suspend fun insert(track: Track) | ||||
|  | ||||
|     suspend fun insertAll(tracks: List<Track>) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user