package gc.mda.signal_batch.domain.vessel.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * S&P Global AIS API 응답 DTO
 *
 * API: POST /AisSvc.svc/AIS/GetTargetsEnhanced
 * Request: {"sinceSeconds": "60"}
 * Response: {"targetEnhancedArr": [...]}
 *
 * mmsi는 String 타입 — 문자 혼합 MMSI 장비 수집 지원
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AisTargetDto {

    @JsonProperty("MMSI")
    private String mmsi;

    @JsonProperty("IMO")
    private Long imo;

    @JsonProperty("AgeMinutes")
    private Double ageMinutes;

    @JsonProperty("Lat")
    private Double lat;

    @JsonProperty("Lon")
    private Double lon;

    @JsonProperty("Heading")
    private Double heading;

    @JsonProperty("SoG")
    private Double sog;

    @JsonProperty("CoG")
    private Double cog;

    @JsonProperty("Width")
    private Integer width;

    @JsonProperty("Length")
    private Integer length;

    @JsonProperty("Draught")
    private Double draught;

    @JsonProperty("Name")
    private String name;

    @JsonProperty("Callsign")
    private String callsign;

    @JsonProperty("Destination")
    private String destination;

    @JsonProperty("ETA")
    private String eta;

    @JsonProperty("Status")
    private String status;

    @JsonProperty("VesselType")
    private String vesselType;

    @JsonProperty("ExtraInfo")
    private String extraInfo;

    @JsonProperty("PositionAccuracy")
    private Integer positionAccuracy;

    @JsonProperty("RoT")
    private Integer rot;

    @JsonProperty("TimestampUTC")
    private Integer timestampUtc;

    @JsonProperty("RepeatIndicator")
    private Integer repeatIndicator;

    @JsonProperty("RAIMFlag")
    private Integer raimFlag;

    @JsonProperty("RadioStatus")
    private Integer radioStatus;

    @JsonProperty("Regional")
    private Integer regional;

    @JsonProperty("Regional2")
    private Integer regional2;

    @JsonProperty("Spare")
    private Integer spare;

    @JsonProperty("Spare2")
    private Integer spare2;

    @JsonProperty("AISVersion")
    private Integer aisVersion;

    @JsonProperty("PositionFixType")
    private Integer positionFixType;

    @JsonProperty("DTE")
    private Integer dte;

    @JsonProperty("BandFlag")
    private Integer bandFlag;

    @JsonProperty("ReceivedDate")
    private String receivedDate;

    @JsonProperty("MessageTimestamp")
    private String messageTimestamp;

    @JsonProperty("LengthBow")
    private Integer lengthBow;

    @JsonProperty("LengthStern")
    private Integer lengthStern;

    @JsonProperty("WidthPort")
    private Integer widthPort;

    @JsonProperty("WidthStarboard")
    private Integer widthStarboard;

    // TargetEnhanced 추가 필드
    @JsonProperty("TonnesCargo")
    private Integer tonnesCargo;

    @JsonProperty("InSTS")
    private Integer inSTS;

    @JsonProperty("OnBerth")
    private Boolean onBerth;

    @JsonProperty("DWT")
    private Integer dwt;

    @JsonProperty("Anomalous")
    private String anomalous;

    @JsonProperty("DestinationPortID")
    private Integer destinationPortID;

    @JsonProperty("DestinationTidied")
    private String destinationTidied;

    @JsonProperty("DestinationUNLOCODE")
    private String destinationUNLOCODE;

    @JsonProperty("ImoVerified")
    private String imoVerified;

    @JsonProperty("LastStaticUpdateReceived")
    private String lastStaticUpdateReceived;

    @JsonProperty("LPCCode")
    private Integer lpcCode;

    @JsonProperty("MessageType")
    private Integer messageType;

    @JsonProperty("Source")
    private String source;

    @JsonProperty("StationId")
    private String stationId;

    @JsonProperty("ZoneId")
    private Double zoneId;
}
