package com.develop.common.data_repo.net.model.response

import com.develop.common.data_repo.db.entity.*
import kotlinx.serialization.Serializable

@Serializable
data class RecipeDetailResult(
    val devAccessorys: List<DevAccessory>,
    val devRecipe: DevRecipe,
    val devRecipeFoods: List<DevRecipeFood>,
    val devRecipeNutritions: List<DevRecipeNutrition>,
    val devRecipePortionSizes: List<DevRecipePortionSize>,
    val recipeUrl: String
)
@Serializable
data class RecipeDataConfig(
    val devAccessorys: List<DevAccessory>,
    val devHotTags: List<DevHotTag>,
    val devPortraits: List<DevPortrait>,
    val devRecipeAccessorys: List<DevRecipeAccessory>,
    val devRecipeCategorys: List<DevRecipeCategory>,
    val devRecipeCookingSteps: List<DevRecipeCookingStep>,
    val devRecipeFoods: List<DevRecipeFood>,
    val devRecipeNutritions: List<DevRecipeNutrition>,
    val devRecipePortionSizes: List<DevRecipePortionSize>,
    val devRecipeRelTags: List<DevRecipeRelTag>,
    val devRecipeTags: List<DevRecipeTag>,
    val devRecipes: List<DevRecipe>,
) {


    fun resetAllCodes() {
        for (data in devAccessorys) {
            data.code = System.nanoTime().toString()
        }
        for (data in devHotTags) {
            data.code = System.nanoTime().toString()
        }
        for (data in devPortraits) {
            data.code = System.nanoTime().toString()
        }
        for (data in devRecipeAccessorys) {
            data.code = System.nanoTime().toString()
        }
        for (data in devRecipeCategorys) {
            data.code = System.nanoTime().toString()
        }
        for (data in devRecipeCookingSteps) {
            data.code = System.nanoTime().toString()
        }
        for (data in devRecipeFoods) {
            data.code = System.nanoTime().toString()
        }
        for (data in devRecipeNutritions) {
            data.code = System.nanoTime().toString()
        }
        for (data in devRecipePortionSizes) {
            data.code = System.nanoTime().toString()
        }
        for (data in devRecipeRelTags) {
            data.code = System.nanoTime().toString()
        }
        for (data in devRecipeTags) {
            data.code = System.nanoTime().toString()
        }
        for (data in devRecipes) {
            data.code = System.nanoTime().toString()
        }
    }
}