package com.sunny.app.soft.timberkeyboardnew.data.entity

import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey
import com.sunny.app.soft.timberkeyboardnew.App
import java.io.Serializable

@Entity(
    tableName = App.TABle_name_2, foreignKeys = arrayOf(
        ForeignKey(
            entity = CategoryEntity::class,
            parentColumns = arrayOf("id"),
            childColumns = arrayOf("categoryId"),
            onDelete = ForeignKey.CASCADE
        )
    ),
    indices = [Index(value = ["id"], unique = true), Index(value = ["categoryId"])]
)
 class BackgroundEntity(

    @PrimaryKey(autoGenerate = true)
    var id: Long = 0,
    var categoryId: Long,
    var coverPath: String,
    var contentPath: String,
    var skinNumber:Int,
    var like: Boolean = false
) : Serializable