package cn.com.ty.lift.business.maintenance.dao.entity.model.response;

import cn.hutool.core.date.BetweenFormater;
import cn.hutool.core.date.DateUtil;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class RepairResponse {
    private Long repairId;
    private String projectName;
    /**
     * 是否紧急 0否 1是
     */
    private Integer isCritical;
    /**
     * 急修原因 0其它 1停电 2故障
     */
    private Integer repairReason;
    /**
     * 保修来源 1物业 2维保 3物联
     */
    private Integer source;
    /**
     * 报修时间
     */
    private LocalDateTime callerDate;
    private String registrationCode;
    /**
     * 电梯类型 1直梯 2扶梯
     */
    private Integer liftType;
    /**
     * 电梯类别(1:曳引梯;2:液压梯;3:杂物梯;4:自动扶梯;5:自动人行道)
     */
    private Integer category;
    private String devicePosition;
    private String workerName;
    private Object waitDiff;

    public String getWaitDiff() {
        return DateUtil.formatBetween((Long) this.waitDiff, BetweenFormater.Level.SECOND);
    }
}