package com.ruoyi.frequency.mallgoods.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.frequency.mallspecifications.entity.MallSpecifications;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

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

/**
 * 商品对象 mall_goods
 *
 * @author liwenlong
 * @date 2024-01-25
 */
@Data
@Accessors(chain = true)
@TableName("mall_goods")
public class MallGoods extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty("删除标志;1正常 删除 3 禁用")
    private Integer delFlag;

    @ApiModelProperty("商品名称")
    @Excel(name = "商品名称")
    private String name;

    @ApiModelProperty("封面图")
    @Excel(name = "封面图")
    private String coverImage;

    @ApiModelProperty("分类id")
    @Excel(name = "分类id")
    private Long goodsTypeId;

    @ApiModelProperty("描述")
    @Excel(name = "描述")
    private String describes;

    @ApiModelProperty("轮播图")
    @Excel(name = "轮播图")
    private String rotationImages;

    @ApiModelProperty("销量")
    @Excel(name = "销量")
    private Integer sales;

    @ApiModelProperty("规格类型;1 单规格 2 多规格")
    @Excel(name = "规格类型;1 单规格 2 多规格")
    private Integer specType;

    @ApiModelProperty("评分")
    @Excel(name = "评分")
    private BigDecimal star;

    @ApiModelProperty("价格(展示用)")
    @Excel(name = "价格(展示用)")
    private String price;

    @ApiModelProperty("商品详情(富文本)")
    @Excel(name = "商品详情(富文本)")
    private String detail;

    @ApiModelProperty("外链")
    @Excel(name = "外链")
    private String goodsUrl;

    @ApiModelProperty("1 淘宝 2 京东")
    @Excel(name = "1 淘宝 2 京东")
    private Integer urlType;

    @ApiModelProperty("上架时间")
    @Excel(name = "上架时间")
    private Date listingTime;

    @ApiModelProperty("商品类型名称")
    @TableField(exist = false)
    private String typeName;

    @ApiModelProperty("限制人数")
    @Excel(name = "限制人数")
    private Integer limitNum;

    @ApiModelProperty("规格")
    @TableField(exist = false)
    private List<MallSpecifications> specificationsList;

    @ApiModelProperty("开始时间")
    @TableField(exist = false)
    private Date beginTime;

    @ApiModelProperty("结束时间")
    @TableField(exist = false)
    private Date endTime;

}
