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.Task;
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_task_t
 *
 * @author wgk
 * @date 2024-08-07
 */
@Data
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Task.class)
public class TaskVo extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

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

    /**
     * 数据源
     */
    @ExcelProperty(value = "数据源", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "common_type")
    private String source;

    /**
     * 架次号
     */
    @ExcelProperty(value = "架次号")
    private Long sortieNo;

    /**
     * 机号
     */
    @ExcelProperty(value = "机号")
    private String aircraftId;

    /**
     * 数据编号
     */
    @ExcelProperty(value = "数据编号")
    private Long dataId;

    /**
     * 预处理编号
     */
    @ExcelProperty(value = "预处理编号")
    private Long preId;

    /**
     * 虚警编号
     */
    @ExcelProperty(value = "虚警编号")
    private Long falseAlarmId;

    /**
     * 故障诊断编号
     */
    @ExcelProperty(value = "故障诊断编号")
    private Long faultId;

    /**
     * 决策编号
     */
    @ExcelProperty(value = "决策编号")
    private Long decisionId;

    /**
     * 状态（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;

}
