package com.design.mischiefgo.entity

import android.os.Parcelable
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import kotlinx.parcelize.Parcelize
@Parcelize
@Entity(tableName = "usual")
data class Usual(
    @PrimaryKey(autoGenerate = true) var id: Int = 0,
    @ColumnInfo(name = "name") var name:String="",
    @ColumnInfo(name = "convert") var convert:String="",
    @ColumnInfo(name="infolist") var infolist:List<Duplicate> = arrayListOf()
): Parcelable

@Parcelize
@Entity(tableName = "duplicate",indices = [Index(value = ["name"], unique = true)])
data class Duplicate(
    @PrimaryKey(autoGenerate = true) var id: Int = 0,
    @ColumnInfo(name = "name") var name: String = "",
    @ColumnInfo(name = "convert") var convert: String = "",
    @ColumnInfo(name = "audioUrl") var audioUrl: String = "",
    @ColumnInfo(name = "isLike") var isLike: Boolean = false,
    @ColumnInfo(name = "isCustomization") var isCustomization: Boolean = false,
    @ColumnInfo(name = "colorIndex") var colorIndex: Int = 0
):Parcelable
