package com.ruoyi.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 无人机任务对象 missions
 *
 * @author ruoyi
 * @date 2024-09-18
 */
public class Missions extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 自增ID
     */
    private Long id;

    /**
     * 任务名称
     */
    @Excel(name = "任务名称")
    private String missionName;

    /**
     * 航线文件ID
     */
    @Excel(name = "航线文件ID")
    private String fileId;

    /**
     * 返航高度
     */
    @Excel(name = "返航高度")
    private Long returnAltitude;
    private Date lastTime;

    public Date getLastTime() {
        return lastTime;
    }

    public void setLastTime(Date lastTime) {
        this.lastTime = lastTime;
    }

    /**
     * 返航高度模式
     */
    @Excel(name = "返航高度模式")
    private Integer returnAltitudeMode;

    /**
     * 遥控器失控类型
     */
    @Excel(name = "遥控器失控类型")
    private Long outOfControlAction;

    /**
     * 航线失控动作
     */
    @Excel(name = "航线失控动作")
    private Integer flightControlAction;

    /**
     * 航线精度类型
     */
    @Excel(name = "航线精度类型")
    private Long waylinePrecisionType;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /**
     * 1立即、2单次定时、3重复定时
     */
    @Excel(name = "1立即、2单次定时、3重复定时")
    private Long type;

    /**
     * 实际执行时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际执行时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date execTime;

    /**
     * flightId
     */
    @Excel(name = "flightId")
    private Long flightId;

    /**
     * 任务状态
     */
    @Excel(name = "任务状态")
    private String state;

    /**
     * 网关
     */
    @Excel(name = "网关")
    private String gateway;


    private Integer flag;

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public Long getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(Long timeStamp) {
        this.timeStamp = timeStamp;
    }

    /**
     * 定时任务需要的参数
     */
    private String timer;

    private Long timeStamp;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setMissionName(String missionName) {
        this.missionName = missionName;
    }

    public String getMissionName() {
        return missionName;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public String getFileId() {
        return fileId;
    }

    public void setReturnAltitude(Long returnAltitude) {
        this.returnAltitude = returnAltitude;
    }

    public Long getReturnAltitude() {
        return returnAltitude;
    }

    public void setReturnAltitudeMode(Integer returnAltitudeMode) {
        this.returnAltitudeMode = returnAltitudeMode;
    }

    public Integer getReturnAltitudeMode() {
        return returnAltitudeMode;
    }

    public void setOutOfControlAction(Long outOfControlAction) {
        this.outOfControlAction = outOfControlAction;
    }

    public Long getOutOfControlAction() {
        return outOfControlAction;
    }

    public void setFlightControlAction(Integer flightControlAction) {
        this.flightControlAction = flightControlAction;
    }

    public Integer getFlightControlAction() {
        return flightControlAction;
    }

    public void setWaylinePrecisionType(Long waylinePrecisionType) {
        this.waylinePrecisionType = waylinePrecisionType;
    }

    public Long getWaylinePrecisionType() {
        return waylinePrecisionType;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setType(Long type) {
        this.type = type;
    }

    public Long getType() {
        return type;
    }

    public void setExecTime(Date execTime) {
        this.execTime = execTime;
    }

    public Date getExecTime() {
        return execTime;
    }

    public void setFlightId(Long flightId) {
        this.flightId = flightId;
    }

    public Long getFlightId() {
        return flightId;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getState() {
        return state;
    }

    public void setGateway(String gateway) {
        this.gateway = gateway;
    }

    public String getTimer() {
        return timer;
    }

    public void setTimer(String timer) {
        this.timer = timer;
    }

    public String getGateway() {
        return gateway;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("missionName", getMissionName())
                .append("fileId", getFileId())
                .append("returnAltitude", getReturnAltitude())
                .append("returnAltitudeMode", getReturnAltitudeMode())
                .append("outOfControlAction", getOutOfControlAction())
                .append("flightControlAction", getFlightControlAction())
                .append("waylinePrecisionType", getWaylinePrecisionType())
                .append("createdAt", getCreatedAt())
                .append("type", getType())
                .append("execTime", getExecTime())
                .append("flightId", getFlightId())
                .append("state", getState())
                .append("gateway", getGateway())
                .append("timer", getTimer())
                .toString();
    }
}
