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

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "최근 위치 업데이트된 선박 정보")
public class RecentVesselPositionDto {

    @Schema(description = "MMSI (9자리, 한국선박 440/441로 시작)", example = "440113620")
    private String mmsi;

    @Schema(description = "경도 (WGS84)", example = "127.0638")
    private Double lon;

    @Schema(description = "위도 (WGS84)", example = "34.227527")
    private Double lat;

    @Schema(description = "대지속도 (knots)", example = "10.4")
    private BigDecimal sog;

    @Schema(description = "대지침로 (도, 0~360)", example = "215.3")
    private BigDecimal cog;

    @Schema(description = "선박명", example = "SAM SUNG 2HO")
    private String shipNm;

    @Schema(description = "선박 유형 (AIS ship type)", example = "74")
    private String shipTy;

    @Schema(
        description = "선박 종류 코드 (000020:어선, 000022:여객선, 000023:화물선 등)",
        example = "000023"
    )
    private String shipKindCode;

    @Schema(description = "국가 코드 (MID 기반, KR=한국)", example = "KR")
    private String nationalCode;

    @Schema(description = "최종 업데이트 시간", example = "2026-01-20 12:05:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastUpdate;
}