package cn.iocoder.yudao.module.mes.controller.admin.organization.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 = "管理后台 - 产线工位 Response VO")
@Data
@ExcelIgnoreUnannotated
    public class OrganizationRespVO {

    @Schema(description = "组织id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9560")
    @ExcelProperty("组织id")
    private Long id;
    @Schema(description = "编码", example = "1")
    private String code;
    @Schema(description = "组织名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @ExcelProperty("组织名称")
    private String name;

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

    @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("显示顺序")
    private Integer sort;

    @Schema(description = "负责人", example = "26059")
    private Long workerUserId;
    @Schema(description = "负责人", example = "26059")
    @ExcelProperty("负责人")
    private String workerUserName;

    @Schema(description = "对应机台id", example = "17654")
    private Long machineId;

    @Schema(description = "对应机台id", example = "17654")
    @ExcelProperty("对应机台")
    private String machineName;

    @Schema(description = "联系电话")
    @ExcelProperty("联系电话")
    private String phone;

    @Schema(description = "邮箱")
    @ExcelProperty("邮箱")
    private String email;

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "是否启用", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean isEnable;

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

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

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

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

    @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String deviceName;

    @Schema(description = "关联采集设备id")
    private Long dvId;

    @Schema(description = "关联采集设备")
    @ExcelProperty("关联采集设备")
    private Long dvName;

}