-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5427bf1
commit bf4e204
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
...data-local/src/main/kotlin/com/maximillianleonov/cinemax/core/data/local/common/Entity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright 2022 Maximillian Leonov | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.maximillianleonov.cinemax.core.data.local.common | ||
|
||
import java.time.LocalDate | ||
|
||
interface Entity { | ||
val id: Int | ||
} | ||
|
||
interface ContentEntity : Entity { | ||
override val id: Int | ||
val remoteId: Int | ||
} | ||
|
||
interface RemoteKeyEntity : Entity { | ||
override val id: Int | ||
val prevPage: Int? | ||
val nextPage: Int? | ||
} | ||
|
||
interface MovieEntity : ContentEntity { | ||
override val id: Int | ||
override val remoteId: Int | ||
val title: String | ||
val overview: String | ||
val popularity: Double | ||
val releaseDate: LocalDate | ||
val adult: Boolean | ||
val genreIds: List<Int> | ||
val originalTitle: String | ||
val originalLanguage: String | ||
val voteAverage: Double | ||
val voteCount: Int | ||
val posterPath: String? | ||
val backdropPath: String? | ||
val video: Boolean | ||
} | ||
|
||
interface TvShowEntity : ContentEntity { | ||
override val id: Int | ||
override val remoteId: Int | ||
val name: String | ||
val overview: String | ||
val popularity: Double | ||
val firstAirDate: LocalDate | ||
val genreIds: List<Int> | ||
val originalName: String | ||
val originalLanguage: String | ||
val originCountry: List<String> | ||
val voteAverage: Double | ||
val voteCount: Int | ||
val posterPath: String? | ||
val backdropPath: String? | ||
} |