package xyz.cottongin.radio247.data.model

import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey

@Entity(
    tableName = "station_preferences",
    foreignKeys = [ForeignKey(
        entity = Station::class,
        parentColumns = ["id"],
        childColumns = ["stationId"],
        onDelete = ForeignKey.CASCADE
    )],
    indices = [Index("stationId", unique = true)]
)
data class StationPreference(
    @PrimaryKey(autoGenerate = true) val id: Long = 0,
    val stationId: Long,
    val qualityOverride: String? = null
)
