package cn.iocoder.yudao.module.pms.controller.admin.iotmainworkorderbom.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - PMS 保养计划明细BOM新增/修改 Request VO")
@Data
public class IotMainWorkOrderBomSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31182")
    private Long id;

    @Schema(description = "保养计划id", example = "17036")
    private Long planId;

    @Schema(description = "保养计划明细id", example = "2291")
    private Long planDetailId;

    @Schema(description = "保养工单id", example = "28354")
    private Long workOrderId;

    @Schema(description = "所属设备分类", example = "5173")
    private Long deviceCategoryId;

    @Schema(description = "设备id", example = "4335")
    private Long deviceId;

    @Schema(description = "保养规则(量程 运行时间 自然日期) 可多选")
    private String rule;

    @Schema(description = "保养规则-里程(0启用 1停用)")
    private Integer mileageRule;

    @Schema(description = "保养规则-自然日期(0启用 1停用)")
    private Integer naturalDateRule;

    @Schema(description = "保养规则-运行时间(0启用 1停用)")
    private Integer runningTimeRule;

    @Schema(description = "保养时累计运行里程KM")
    private BigDecimal mainMileage;

    @Schema(description = "保养时累计运行时长H")
    private BigDecimal mainRuntime;

    @Schema(description = "上次保养运行时长(小时)")
    private BigDecimal lastRunningTime;

    @Schema(description = "下次保养运行时长(小时)")
    private BigDecimal nextRunningTime;

    @Schema(description = "推迟运行时长(小时)")
    private BigDecimal delayDuration;

    @Schema(description = "上次保养运行公里数(千米)")
    private BigDecimal lastRunningKilometers;

    @Schema(description = "下次保养运行公里数(千米)")
    private BigDecimal nextRunningKilometers;

    @Schema(description = "推迟运行公里数(千米)")
    private BigDecimal delayKilometers;

    @Schema(description = "上次保养自然日期")
    private LocalDateTime lastNaturalDate;

    @Schema(description = "下次保养自然日期(天)")
    private BigDecimal nextNaturalDate;

    @Schema(description = "推迟自然日期(天)")
    private BigDecimal delayNaturalDate;

    @Schema(description = "推迟原因", example = "不对")
    private String delayReason;

    @Schema(description = "上次保养日期")
    private LocalDateTime lastMainDate;

    @Schema(description = "时间周期(小时)")
    private BigDecimal timePeriod;

    @Schema(description = "时间周期-提前量(小时)")
    private BigDecimal timePeriodLead;

    @Schema(description = "公里数周期(千米)")
    private BigDecimal kilometerCycle;

    @Schema(description = "公里数周期-提前量(千米)")
    private BigDecimal kiloCycleLead;

    @Schema(description = "自然日周期(天)")
    private BigDecimal naturalDatePeriod;

    @Schema(description = "自然日周期-提前量(天)")
    private BigDecimal naturalDatePeriodLead;

    @Schema(description = "BOM节点id", example = "13933")
    private Long bomNodeId;

    @Schema(description = "BOM名称", example = "李四")
    private String name;

    @Schema(description = "BOM编码")
    private String code;

    @Schema(description = "父BOM id 顶级为0", example = "2631")
    private Long parentId;

    @Schema(description = "子节点id 逗号分隔")
    private String childIds;

    @Schema(description = "层级")
    private Integer level;

    @Schema(description = "是否叶子节点 0是 1否")
    private Integer leafFlag;

    @Schema(description = "显示顺序")
    private Integer sort;

    @Schema(description = "1维修 2保养 维修+保养 (1,2)", example = "2")
    private String type;

    @Schema(description = "保养类型(1临时保养  2计划保养)", example = "1")
    private Integer mainType;

    @Schema(description = "状态 0启用  1停用", example = "2")
    private Integer status;

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

    @Schema(description = "版本")
    private Integer version;

    /**
     * 扩展字段
     */
    @Schema(description = "累计运行公里数 KM")
    private BigDecimal totalMileage;

    @Schema(description = "累计运行时间 H")
    private BigDecimal totalRunTime;

    @Schema(description = "设备分类id")
    private Long assetClass;
}