package com.omixlab.lckcontrol.data.local.entity

import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey
import java.util.UUID

@Entity(
    tableName = "stream_destinations",
    foreignKeys = [
        ForeignKey(
            entity = StreamPlanEntity::class,
            parentColumns = ["planId"],
            childColumns = ["planId"],
            onDelete = ForeignKey.CASCADE,
        )
    ],
    indices = [Index("planId")],
)
data class StreamDestinationEntity(
    @PrimaryKey val id: String = UUID.randomUUID().toString(),
    val planId: String,
    val service: String,
    val linkedAccountId: String = "",
    val title: String,
    val description: String = "",
    val privacyStatus: String = "public",
    val gameId: String = "",
    val tags: String = "",
    val rtmpUrl: String = "",
    val streamKey: String = "",
    val broadcastId: String = "",
    val status: String = "PENDING",
)
