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

import cn.iocoder.yudao.module.mes.dal.dataobject.dvcheckdevice.DvCheckDeviceDO;
import cn.iocoder.yudao.module.mes.dal.dataobject.dvchecksubject.DvCheckSubjectDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 维保计划新增/修改 Request VO")
@Data
public class DvCheckSaveReqVO {

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

    @Schema(description = "计划编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "计划编码不能为空")
    private String planCode;

    @Schema(description = "计划名称", example = "张三")
    private String planName;

    @Schema(description = "计划类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotEmpty(message = "计划类型不能为空")
    private String planType;

    @Schema(description = "开始日期")
    private LocalDateTime startDate;

    @Schema(description = "结束日期")
    private LocalDateTime endDate;

    @Schema(description = "状态", example = "1")
    private String status;

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

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否启用不能为空")
    private Boolean isEnable;

    @Schema(description = "频率单位")
    private String cycleUnit;

    @Schema(description = "频率", example = "16646")
    private BigDecimal cycleCount;

    @Schema(description = "维保等级")
    private String planLevel;

    @Schema(description = "上次执行时间")
    private LocalDateTime lastTime;

    @Schema(description = "计算公式")
    private String formulaCode;

    @Schema(description = "维保计划设备列表")
    private List<DvCheckDeviceDO> dvCheckDevices;

    @Schema(description = "维保计划项目列表")
    private List<DvCheckSubjectDO> dvCheckSubjects;

}