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

/**
 * 商品详情 VO（包含 SKU 列表）
 */
@Data
@Schema(description = "商品详情")
public class ProductDetailVO 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 List<String> subImages;

    @Schema(description = "富文本详情")
    private String detail;

    @Schema(description = "原价")
    private BigDecimal originPrice;

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

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

    @Schema(description = "浏览量")
    private Integer viewCount;

    @Schema(description = "状态")
    private Integer status;

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

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

    @Schema(description = "SKU 列表")
    private List<ProductSkuVO> skuList;

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