package com.base.core.model.enity;

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

import java.util.*;

@Data
public class StripDTO {

    @ApiModelProperty("条带id")
    private String id;
    @ApiModelProperty("需求id")
    private String reqId;
    @ApiModelProperty("侦察窗口id,方便后面设置条带的窗口关联id")
    private String windowId;
    @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 Integer 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 Double rollAngle;
    @ApiModelProperty("俯仰角")
    private Double pitchAngle;
    @ApiModelProperty("条带点集合")
    private List<PointDTO> pointDTOList;
    @ApiModelProperty("访问时刻")
    private Date accessTime;
    @ApiModelProperty("访问时刻结束")
    private Date accessTimeend;
    @ApiModelProperty("圈号")
    private String circle;
    @ApiModelProperty("覆盖率")
    private Double coverageRate;
    @ApiModelProperty("太阳高度角")
    private Double sunAngle;
    @ApiModelProperty("幅宽，单位米")
    private Double swathWidth;
    @ApiModelProperty("最大幅宽相关信息")
    private MaxPayload maxPayload;

    /**
     * 轨迹开始节点
     */
    private SubPoint startpoint;
    /**
     * 轨迹结束节点
     */
    private SubPoint endpoint;

    private List<SubPoint> vertex_points;

    private String upDown;

    private List<Eph> ephList;

    private List<SphericalPoint> pointInArea;

    private List<Date> dates;

    /**
     * 不同载荷，包含的网格编码
     */
    private Map<String, Strip2grid> strip2grid = new HashMap<>();

    /**
     * 网格编码
     */
    private List<String> gridcodelist = new ArrayList<>();


    @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);
    }
}
