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.SmTaskSub;
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;
import java.util.Date;

/**
 * 定检任务子视图对象 als_sm_task_sub_t
 *
 * @author wgk
 * @date 2024-07-25
 */
@Data
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SmTaskSub.class)
public class SmTaskSubVo 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 aircraftModel;

    /**
     * 任务名称
     */
    @ExcelProperty(value = "任务名称")
    private Date name;

    /**
     * 任务编码
     */
    @ExcelProperty(value = "任务编码")
    private String code;

    /**
     * 维修时间
     */
    @ExcelProperty(value = "维修时间")
    private Date endTime;

    /**
     * 剩余时间
     */
    @ExcelProperty(value = "剩余时间")
    private String remainTime;

    /**
     * 专业
     */
    @ExcelProperty(value = "专业")
    private String specialty;

    /**
     * 下发日期
     */
    @ExcelProperty(value = "下发日期")
    private Date issueDate;

    /**
     * 完成日期
     */
    @ExcelProperty(value = "完成日期")
    private Date finishDate;

    /**
     * 工作人
     */
    @ExcelProperty(value = "工作人")
    private String staff;

    /**
     * 复查人
     */
    @ExcelProperty(value = "复查人")
    private String reviewBy;

    /**
     * 单位
     */
    @ExcelProperty(value = "单位")
    private String unitName;

    /**
     * 维修内容
     */
    @ExcelProperty(value = "维修内容")
    private String contents;

    /**
     * 状态（1正常）
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "common_type")
    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;

}
