package kr.co.vividnext.sodalive.mypage.alarm.db

import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "alarms")
data class Alarm(
    @PrimaryKey(autoGenerate = true) val id: Int = 0,
    val title: String,
    var time: Long,
    val days: List<String>,
    val contentId: Long,
    val contentTitle: String,
    val contentCreatorNickname: String,
    var volume: Int,
    var isEnabled: Boolean = true
) {
    fun getDaysText(): String {
        return if (days.size == 7) "매일" else days.joinToString(", ")
    }
}
