package cn.iocoder.yudao.module.system.controller.admin.biz.vo.excel;

import cn.iocoder.yudao.module.system.convert.excel.SaleFlagConverter;
import cn.iocoder.yudao.module.system.convert.excel.StatusConverter;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

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


/**
 * 物资设置 Excel 导入 VO
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false) // 设置 chain = false，避免用户导入有问题
public class MaterialConfigExcelVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18474")
    private Long id;

    @ExcelProperty("序号")
    private Integer serialNumber;

    @Schema(description = "物资名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @ExcelProperty("物资名称(必填)")
    private String name;

    @Schema(description = "拼音码")
    @ExcelProperty("拼音码")
    private String pinyinCode;

    @Schema(description = "物品类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("物资类型(必填)")
    private String type;

    @Schema(description = "单位")
    @ExcelProperty("单位(必填)")
    private String unit;

    @Schema(description = "规格")
    @ExcelProperty("规格")
    private String specification;

    @Schema(description = "是否销售标识，1-是，2-否")
    @ExcelProperty(value = "是否销售标识", converter = SaleFlagConverter.class)
    private Integer saleFlag;

    @Schema(description = "费用金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("费用金额")
    private BigDecimal itemAmount;

    @Schema(description = "安全库存量", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("安全库存(必填)")
    private Integer safetyStock;

    @Schema(description = "物资描述", example = "你猜")
    @ExcelProperty("描述")
    private String description;

    @Schema(description = "状态，0-启动，1-禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "状态", converter = StatusConverter.class)
    private Integer status;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime createTime;

    @Schema(description = "系统类型，1：机构 2：居家(社区) 3：旅居", example = "1")
    private Integer orgType;


}
