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

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

    @Schema(description = "工位id", requiredMode = Schema.RequiredMode.REQUIRED, example = "4727")
    private Long orgId;
    @Schema(description = "工位", requiredMode = Schema.RequiredMode.REQUIRED, example = "4727")
    @ExcelProperty("工位")
    private String orgName;
    @Schema(description = "工位", requiredMode = Schema.RequiredMode.REQUIRED, example = "4727")
    @ExcelProperty("工序类型")
    @DictFormat("mes_org_type")
    private String orgType;

    @Schema(description = "工作日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("工作日期")
    private LocalDateTime workDate;

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

    @Schema(description = "工人id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2095")
    private Long workerId;
    @Schema(description = "工人", requiredMode = Schema.RequiredMode.REQUIRED, example = "2095")
    @ExcelProperty("工人")
    private String workerName;

    @Schema(description = "报工单id", example = "5496")
    @ExcelProperty("报工单id")
    private Long reportId;

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

    @Schema(description = "操作人", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("操作人")
    private String   creator;

}