package cn.iocoder.yudao.module.iot.controller.admin.iotorganization.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
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;

@Schema(description = "管理后台 - IOT组织 Response VO")
@Data
@ExcelIgnoreUnannotated
public class IotOrganizationRespVO {

    @Schema(description = "组织id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24521")
    @ExcelProperty("组织id")
    private Long id;

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

    @Schema(description = "负责人/工人", example = "11964")
    @ExcelProperty("负责人/工人")
    private Long workerUserId;

    @Schema(description = "绑定工位id", example = "21787")
    @ExcelProperty("绑定工位id")
    private Long orgId;

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

    @Schema(description = "组织名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @ExcelProperty("组织名称")
    private String name;

    @Schema(description = "父组织id", requiredMode = Schema.RequiredMode.REQUIRED, example = "10729")
    @ExcelProperty("父组织id")
    private Long parentId;

    @Schema(description = "组织状态", example = "2")
    @ExcelProperty(value = "组织状态", converter = DictConvert.class)
    @DictFormat("mes_machine_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;

    @Schema(description = "设备类型", example = "2")
    @ExcelProperty(value = "设备类型", converter = DictConvert.class)
    @DictFormat("iot_device_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String deviceType;

    @Schema(description = "组织等级")
    @ExcelProperty(value = "组织等级", converter = DictConvert.class)
    @DictFormat("iot_org_class") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String orgClass;

    @Schema(description = "机台类型", example = "2")
    @ExcelProperty(value = "机台类型", converter = DictConvert.class)
    @DictFormat("mes_org_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String machineType;

}