package org.dromara.system.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSONObject;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.system.domain.SysRecipe;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;


/**
 * 食谱管理视图对象 sys_recipe
 *
 * @author Lion Li
 * @date 2025-07-01
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = SysRecipe.class)
public class SysRecipeVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @ExcelProperty(value = "主键ID")
    private Long recipeId;

    /**
     * 食谱名称
     */
    @ExcelProperty(value = "食谱名称")
    private String name;

    /**
     * 食谱分类ID
     */
    @ExcelProperty(value = "食谱分类ID")
    private Long categoryId;

    private String categoryName;

    /**
     * 基本膳食
     */
    @ExcelProperty(value = "基本膳食")
    private String baseDiet;

    private String baseDietName;

    /**
     * 餐次
     */
    @ExcelProperty(value = "餐次")
    private String mealTime;

    /**
     * 食谱价格
     */
    @ExcelProperty(value = "食谱价格")
    private BigDecimal price;

    /**
     * 适用疾病（可用逗号分隔多个）
     */
    @ExcelProperty(value = "适用疾病", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "可=用逗号分隔多个")
    private String suitableDisease;

    /**
     * 忌食病症（可用逗号分隔多个）
     */
    @ExcelProperty(value = "忌食病症", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "可=用逗号分隔多个")
    private String avoidDisease;

    /**
     * 适用科室（可用逗号分隔多个）
     */
    @ExcelProperty(value = "适用科室", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "可=用逗号分隔多个")
    private String suitableDept;

    /**
     * 智能推荐（0否 1是）
     */
    @ExcelProperty(value = "智能推荐", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=否,1=是")
    private String smartRecommend;

    /**
     * 制作方式
     */
    @ExcelProperty(value = "制作方式")
    private String cookingMethod;

    /**
     * 状态（0正常 1停用）
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=正常,1=停用")
    private String status;

    private List<SysDiseaseLabelVo> avoidDiseaseList;

    private List<SysDiseaseLabelVo> suitableDiseaseList;

    private List<SysFoodIngredientVo> foodList;

    private JSONObject nutrientAnalysis;
}
