package org.dromara.system.domain.bo;

import org.dromara.system.domain.SysRecipeFoodIngredient;
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;

/**
 * 食谱与食材关联业务对象 sys_recipe_food_ingredient
 *
 * @author Lion Li
 * @date 2025-07-01
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysRecipeFoodIngredient.class, reverseConvertGenerate = false)
public class SysRecipeFoodIngredientBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
    private Long id;

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

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

    /**
     * 用量（可选，单位自定义）
     */
    private BigDecimal quantity;

    /**
     * 热量（kcal）
     */
    private BigDecimal calories;

    /**
     * 备注
     */
    private String remark;
}
