package org.eco.als.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.eco.common.mapper.annotation.FieldMapper;
import com.eco.common.mapper.constant.MapperConstant;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.eco.als.domain.LifePrediction;
import org.eco.common.excel.annotation.ExcelDictFormat;
import org.eco.common.excel.convert.ExcelDictConvert;
import org.eco.common.orm.core.domain.BaseEntity;

import java.io.Serial;
import java.io.Serializable;

/**
 * 寿命预测视图对象 als_life_prediction_t
 *
 * @author wgk
 * @date 2024-07-26
 */
@Data
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = LifePrediction.class)
public class LifePredictionVo extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @ExcelProperty(value = "编号")
    private Long id;

    /**
     * 机号Id
     */
    private String aircraftId;

    /**
     * 机号
     */
    @ExcelProperty(value = "机号")
    @FieldMapper(type = MapperConstant.AIRCRAFT_ID_TO_NO, mapper = "aircraftId")
    private String aircraftNo;

    /**
     * 部件名称
     */
    @ExcelProperty(value = "部件名称")
    private String name;

    /**
     * 型号
     */
    @ExcelProperty(value = "型号")
    private String model;

    /**
     * 所属系统
     */
    @ExcelProperty(value = "所属系统")
    private String system;

    /**
     * 处理方式
     */
    @ExcelProperty(value = "处理方式", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "common_type")
    private String methodType;

    /**
     * 剩余时长（h）
     */
    @ExcelProperty(value = "剩余时长", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "h=")
    private String remainTiem;

    /**
     * 状态（1正常）
     */
    @ExcelProperty(value = "状态（1正常）")
    private String status;

    /**
     * 删除标识（1删除 0未删除）
     */
    @ExcelProperty(value = "删除标识（1删除 0未删除）")
    private Integer delFlag;


    /**
     * 创建人名称
     */
    @FieldMapper(type = MapperConstant.USER_ID_TO_NAME, mapper = "createBy")
    private String createByName;

    /**
     * 创建人名称
     */
    @FieldMapper(type = MapperConstant.USER_ID_TO_NAME, mapper = "updateBy")
    private String updateByName;

}
