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.math.BigDecimal;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "hotel_dish")
public class HotelDish extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 菜品名称 */
    @Query(tableColumn = "a.name", type = QueryType.LIKE)
    private String name;

    /** 分类ID */
    private String categoryId;

    /** 基础价格 */
    private BigDecimal price;

    /** 菜品图片URL */
    private String image;

    /** 菜品描述 */
    private String description;

    /** 标签(逗号分隔) */
    private String tags;

    /** 预计制作时长(分钟) */
    private Integer prepTime;

    /** 月销量 */
    private Integer sales;

    /** 状态：ON_SALE-在售, OFF_SHELF-下架 */
    @Query(tableColumn = "a.status", type = QueryType.EQ)
    private String status;

    /** 是否售罄(0正常 1售罄) */
    private Integer soldOut;

    /** 是否主厨推荐(0否 1是) */
    private Integer isRecommended;

    /** 排序权重 */
    private Integer sortOrder;

    /** 分类名称(非DB字段，查询用) */
    @TableField(exist = false)
    private String categoryName;

    /** 规格组列表(非DB字段) */
    @TableField(exist = false)
    private List<HotelDishSpec> specGroups;

    /** 加料列表(非DB字段) */
    @TableField(exist = false)
    private List<HotelDishAddition> additions;
}
