package com.base.plan.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;
import java.util.Objects;

@Data
public class StripDTO {
    @ApiModelProperty("条带id")
    private String id;
    @ApiModelProperty("需求id")
    private String reqId;
    @ApiModelProperty("目标名称")
    private String targetName;
    @ApiModelProperty("优先级")
    private String priority;
    @ApiModelProperty("卫星id")
    private String satelliteId;
    @ApiModelProperty("卫星编号")
    private String satelliteCode;
    @ApiModelProperty("载荷工作模式")
    private String workMode;
    @ApiModelProperty("载荷id")
    private String payloadId;
    @ApiModelProperty("载荷类型")
    private String payloadType;
    @ApiModelProperty("时长")
    private Long duration;
    @ApiModelProperty("观测开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date observationStartTime;
    @ApiModelProperty("观测结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date observationEndTime;
    @ApiModelProperty("侧摆")
    private String rollAngle;
    @ApiModelProperty("条带点集合")
    private List<PointDTO> pointDTOList;
    @ApiModelProperty("访问时刻")
    private Date accessTime;
    @ApiModelProperty("圈号")
    private String circle;
    @ApiModelProperty("覆盖率")
    private String coverageRate;
    @ApiModelProperty("幅宽，单位米")
    private String swathWidth;
    @ApiModelProperty("网格编码")
    private List<String> girdCodeList;
    @ApiModelProperty("是否被选中，1：不是；2：是")
    private Integer isSelected;

    @ApiModelProperty("优选标记 0普通默认 1优选")
    private Integer preferred=0;

    @ApiModelProperty("区域目标点的parentID")
    private String parentId;

    @ApiModelProperty("分辨率 单位米")
    private Double groundResolution;
    @ApiModelProperty("俯仰角")
    private Double pitchAngle;

    @ApiModelProperty("是否被选中，1是，2否")
    private Integer isUsed;
    @ApiModelProperty("窗口id")
    private String windowId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StripDTO stripDTO = (StripDTO) o;
        return id.equals(stripDTO.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}