package cn.iocoder.yudao.module.mes.controller.admin.taskmanagement.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDate;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;

@Schema(description = "管理后台 - 设备类型 Response VO")
@Data
@ExcelIgnoreUnannotated
public class TaskManagementRespVO extends BaseDO {

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

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

    @Schema(description = "类型(1-点检 2-保养)", example = "2")
    private Integer taskType;

    @Schema(description = "类型名称")
    @ExcelProperty("类型名称")
    private String TypeName;


    @Schema(description = "设备列表")
//    @ExcelProperty("设备列表")
    private String deviceList;

    @Schema(description = "项目表单")
    private Long projectForm;

    @Schema(description = "项目表单名称")
    @ExcelProperty("项目表单名称")
    private String projectFormName;

    @Schema(description = "起止开始日期")
    @ExcelProperty("起止开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate startDate;

    @Schema(description = "起止结束日期")
    @ExcelProperty("起止结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDate;

    @Schema(description = "cron表达式")
    @ExcelProperty("cron表达式")
    private String cronExpression;

    @Schema(description = "可操作人")
//    @ExcelProperty("可操作人")
    private String operableUsers;

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

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

    @Schema(description = "创建人名字")
    @ExcelProperty("创建人名字")
    private String creatorName;



}