2019-04-28 22:43:52 +02:00
|
|
|
package org.schabi.newpipe.database.feed.model
|
|
|
|
|
|
|
|
import androidx.room.ColumnInfo
|
|
|
|
import androidx.room.Entity
|
2020-02-26 03:01:23 +01:00
|
|
|
import androidx.room.Index
|
2019-04-28 22:43:52 +02:00
|
|
|
import androidx.room.PrimaryKey
|
|
|
|
import org.schabi.newpipe.database.feed.model.FeedGroupEntity.Companion.FEED_GROUP_TABLE
|
2020-02-26 03:01:23 +01:00
|
|
|
import org.schabi.newpipe.database.feed.model.FeedGroupEntity.Companion.SORT_ORDER
|
2019-04-28 22:43:54 +02:00
|
|
|
import org.schabi.newpipe.local.subscription.FeedGroupIcon
|
2019-04-28 22:43:52 +02:00
|
|
|
|
2020-02-26 03:01:23 +01:00
|
|
|
@Entity(
|
|
|
|
tableName = FEED_GROUP_TABLE,
|
|
|
|
indices = [Index(SORT_ORDER)]
|
|
|
|
)
|
2019-04-28 22:43:52 +02:00
|
|
|
data class FeedGroupEntity(
|
|
|
|
@PrimaryKey(autoGenerate = true)
|
|
|
|
@ColumnInfo(name = ID)
|
|
|
|
val uid: Long,
|
|
|
|
|
|
|
|
@ColumnInfo(name = NAME)
|
|
|
|
var name: String,
|
|
|
|
|
|
|
|
@ColumnInfo(name = ICON)
|
2020-02-26 03:01:23 +01:00
|
|
|
var icon: FeedGroupIcon,
|
|
|
|
|
|
|
|
@ColumnInfo(name = SORT_ORDER)
|
|
|
|
var sortOrder: Long = -1
|
2019-04-28 22:43:52 +02:00
|
|
|
) {
|
|
|
|
companion object {
|
|
|
|
const val FEED_GROUP_TABLE = "feed_group"
|
|
|
|
|
|
|
|
const val ID = "uid"
|
|
|
|
const val NAME = "name"
|
|
|
|
const val ICON = "icon_id"
|
2020-02-26 03:01:23 +01:00
|
|
|
const val SORT_ORDER = "sort_order"
|
2020-01-28 06:59:49 +01:00
|
|
|
|
|
|
|
const val GROUP_ALL_ID = -1L
|
2019-04-28 22:43:52 +02:00
|
|
|
}
|
|
|
|
}
|