package com.jeeplus.hotelorder.dish.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jeeplus.core.domain.BaseEntity;
import com.jeeplus.core.query.Query;
import com.jeeplus.core.query.QueryType;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 菜品规格组实体
 * @author jeeplus
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "hotel_dish_spec_group")
public class HotelDishSpecGroup extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 关联菜品ID */
    @Query(tableColumn = "dish_id", type = QueryType.EQ)
    private String dishId;

    /** 规格组名称(如:熟度、酱汁) */
    private String groupName;

    /** 是否必选: 0-可选, 1-必选 */
    private Integer required;

    /** 排序号 */
    private Integer sortOrder;

    /** 关联菜品名称(非DB字段，查询时填充) */
    @TableField(exist = false)
    private String dishName;

    /** 规格选项列表(非DB字段) */
    @TableField(exist = false)
    private List<HotelDishSpecOption> options;
}
