package com.yc.ship.module.product.controller.admin.productSpu.spuVO;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yc.ship.framework.excel.core.annotations.DictFormat;
import com.yc.ship.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

@Schema(description = "管理后台 - 产品基础信息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ProductSpuExcelVO {

    @Schema(description = "排序号")
    @ExcelProperty("排序")
    private Integer sortNum;

    @ExcelProperty("产品编码")
    @Schema(description = "产品id", example = "1")
    private Long id;

    @ExcelProperty("产品")
    @Schema(description = "产品名字", example = "王五")
    private String productName;

    @ExcelProperty("产品简称")
    @Schema(description = "产品简称", example = "王五")
    private String shortName;

    @ExcelProperty("成本价")
    @Schema(description = "成本价")
    private BigDecimal costPrice;

    @DictFormat("product_type")
    @ExcelProperty(value = "产品类型", converter = DictConvert.class)
    @Schema(description = "产品类型", example = "2")
    private Integer productType;

    @ExcelProperty("产品标签")
    @Schema(description = "产品标签")
    private String productTag;

    @DictFormat("crm_product_status")
    @ExcelProperty(value="上架状态", converter = DictConvert.class)
    @Schema(description = "上架状态")
    private Integer isUse;

    @ColumnWidth(value = 20)
    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @ExcelProperty("产品分组")
    @Schema(description = "产品分组")
    private String categoryName;

    @ExcelProperty("产品内容")
    @Schema(description = "产品内容")
    private String projectNames;

}