package cn.iocoder.yudao.module.mes.controller.admin.record.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 RecordTemplateRespVO {

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

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

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

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

    @Schema(description = "班组id", example = "15655")
    @ExcelProperty("班组id")
    private Long workTeamId;

    @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("开始时间")
    private LocalDateTime startTime;

    @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("结束时间")
    private LocalDateTime endTime;

    @Schema(description = "组长上午审批id")
    @ExcelProperty("组长上午审批id")
    private Long groupManagerApproveId1;

    @Schema(description = "组长下午审批id")
    @ExcelProperty("组长下午审批id")
    private Long groupManagerApproveId2;

    @Schema(description = "主管上午审批id")
    @ExcelProperty("主管上午审批id")
    private Long productionManagerApproveId1;

    @Schema(description = "主管下午审批id")
    @ExcelProperty("主管下午审批id")
    private Long productionManagerApproveId2;

    @Schema(description = "流程实例的编号", example = "16577")
    @ExcelProperty("流程实例的编号")
    private String processInstanceId;

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

    @Schema(description = "记录类型（工序类型）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "记录类型（工序类型）", converter = DictConvert.class)
    @DictFormat("mes_org_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String recordType;

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

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

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

}