package org.dromara.system.domain.bo;

import org.dromara.system.domain.SysRecipe;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * 食谱管理业务对象 sys_recipe
 *
 * @author Lion Li
 * @date 2025-07-01
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysRecipe.class, reverseConvertGenerate = false)
public class SysRecipeBo extends BaseEntity {

    /**
     * 主键ID
     */
    private Long recipeId;

    private String recipeIds;

    /**
     * 食谱名称
     */
    @NotBlank(message = "食谱名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 食谱分类ID
     */
    @NotNull(message = "食谱分类不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long categoryId;

    /**
     * 基本膳食
     */
    @NotBlank(message = "基本膳食不能为空", groups = { AddGroup.class, EditGroup.class })
    private String baseDiet;

    /**
     * 餐次
     */
    private String mealTime;

    /**
     * 食谱价格
     */
    @NotNull(message = "食谱价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;

    /**
     * 适用疾病（可用逗号分隔多个）
     */
    private String suitableDisease;

    /**
     * 忌食病症（可用逗号分隔多个）
     */
    private String avoidDisease;

    /**
     * 适用科室（可用逗号分隔多个）
     */
    private String suitableDept;

    /**
     * 智能推荐（0否 1是）
     */
    @NotBlank(message = "智能推荐不能为空", groups = { AddGroup.class, EditGroup.class })
    private String smartRecommend;

    /**
     * 制作方式
     */
    private String cookingMethod;

    /**
     * 状态（0正常 1停用）
     */
    private String status;

    @NotEmpty(message = "食材组成不能为空", groups = { AddGroup.class, EditGroup.class })
    private List<SysRecipeFoodIngredientBo> foodList;
}
