package com.bonus.canteen.core.cook.domain;

import com.bonus.canteen.core.common.utils.FileUrlUtil;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;

import java.math.BigDecimal;

/**
 * 菜品收藏对象 cook_collection_dishes
 * 
 * @author xsheng
 * @date 2025-05-25
 */


@Data
@ToString
public class CookCollectionDishes extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键自增 */
    private Long id;

    /** 人员id */
    @Excel(name = "人员id")
    @ApiModelProperty(value = "人员id")
    private Long userId;

    /** 店铺档口id */
    @Excel(name = "店铺档口id")
    @ApiModelProperty(value = "店铺档口id")
    private Long stallId;

    /** 菜品id */
    @Excel(name = "菜品id")
    @ApiModelProperty(value = "菜品id")
    private Long dishesId;

    @ApiModelProperty(value = "菜品名称")
    private String dishesName;

    @ApiModelProperty(value = "图片地址")
    private String imageUrl;

    @ApiModelProperty(value = "价格")
    private BigDecimal price;

    @ApiModelProperty(value = "售出数量")
    private Integer saleNum;

    @ApiModelProperty("是否收藏(1-收藏,2-未收藏)")
    private Integer isFavorites;

    public String getImageUrl() {
        return FileUrlUtil.getFileUrl(this.imageUrl);
    }

}
