package cn.iocoder.yudao.module.pms.controller.admin.iotdevicebom.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - PMS 设备BOM 关系 Response VO")
@Data
@ExcelIgnoreUnannotated
public class IotDeviceBomRespVO {

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

    @Schema(description = "所属设备分类", example = "29983")
    @ExcelProperty("所属设备分类")
    private Long deviceCategoryId;

    @Schema(description = "所属设备", example = "11465")
    @ExcelProperty("所属设备")
    private Long deviceId;

    @Schema(description = "BOM名称", example = "张三")
    @ExcelProperty("BOM名称")
    private String name;

    @Schema(description = "BOM编码")
    @ExcelProperty("BOM编码")
    private String code;

    @Schema(description = "父BOM id 顶级为0", example = "25524")
    @ExcelProperty("父BOM id 顶级为0")
    private Long parentId;

    @Schema(description = "子节点id 逗号分隔")
    @ExcelProperty("子节点id 逗号分隔")
    private String childIds;

    @Schema(description = "层级")
    @ExcelProperty("层级")
    private Integer level;

    @Schema(description = "是否叶子节点 0是 1否")
    @ExcelProperty("是否叶子节点 0是 1否")
    private Integer leafFlag;

    @Schema(description = "显示顺序")
    @ExcelProperty("显示顺序")
    private Integer sort;

    @Schema(description = "1维修 2保养 A维修+保养", example = "1,2")
    @ExcelProperty("1维修 2保养 A维修+保养")
    private List<Integer> type;

    @Schema(description = "状态 0启用  1停用", example = "2")
    @ExcelProperty("状态 0启用  1停用")
    private Integer status;

    @Schema(description = "备注", example = "你猜")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "版本")
    @ExcelProperty("版本")
    private Integer version;

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

    /**
     * 扩展字段
     */
    @Schema(description = "已经绑定的物料数量")
    private Integer materials;

    @Schema(description = "所属设备分类名称", example = "空压机")
    @ExcelProperty("所属设备分类")
    private String deviceCategoryName;
}