package com.ruoyi.ss.product.domain;

import java.math.BigDecimal;

import com.ruoyi.common.core.domain.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * 商品列表对象 ss_product
 *
 * @author qzz
 * @date 2024-12-16
 */
@Data
public class Product extends BaseEntity{

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品id")
    @NotNull(message = "商品id不允许为空", groups = {ValidGroup.Update.class})
    private Long productId;

    @Excel(name = "店铺id")
    @ApiModelProperty("店铺id")
    @NotNull(message = "店铺id不允许为空")
    private Long storeId;

    @Excel(name = "商户id")
    @ApiModelProperty("商户id")
    private Long merchantId;

    @Excel(name = "商品名称")
    @ApiModelProperty("商品名称")
    @NotBlank(message = "商品名称不允许为空")
    private String name;

    @Excel(name = "图片")
    @ApiModelProperty("图片")
    private String picture;

    @Excel(name = "库存")
    @ApiModelProperty("库存")
    @NotNull(message = "库存不允许为空")
    @Positive(message = "库存必须为正整数")
    @Min(value = 1, message = "库存必须大于0")
    private Integer stock;

    @Excel(name = "价格")
    @ApiModelProperty("价格")
    @NotNull(message = "价格不允许为空")
    private BigDecimal price;

    @Excel(name = "状态")
    @ApiModelProperty("状态")
    private String status;

}
