package com.snack.server.module.product.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品列表 VO
 */
@Data
@Schema(description = "商品列表项")
public class ProductListVO implements Serializable {

    @Schema(description = "商品 ID")
    private Long id;

    @Schema(description = "商品名称")
    private String name;

    @Schema(description = "分类 ID")
    private Long categoryId;

    @Schema(description = "分类名称")
    private String categoryName;

    @Schema(description = "品牌")
    private String brand;

    @Schema(description = "主图")
    private String mainImage;

    @Schema(description = "起售价")
    private BigDecimal minPrice;

    @Schema(description = "最高价")
    private BigDecimal maxPrice;

    @Schema(description = "总库存（所有 SKU 之和）")
    private Integer totalStock;

    @Schema(description = "累计销量")
    private Integer sales;

    @Schema(description = "状态：0-下架 1-上架")
    private Integer status;

    @Schema(description = "是否热门")
    private Integer isHot;

    @Schema(description = "是否新品")
    private Integer isNew;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
}
