package com.heyu.api.baidu.response.common;


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

import java.util.List;


/**
 * https://console.bce.baidu.com/support/?_=1740219852952&timestamp=1740281560085#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E9%80%9A%E7%94%A8%E5%9C%BA%E6%99%AFOCR&api=rest%2F2.0%2Focr%2Fv1%2Faccurate&method=post
 */
@NoArgsConstructor
@Data
public class BAccurateResp  {
    @JsonProperty("words_result")
    private List<WordsResultDTO> wordsResult;
    @JsonProperty("words_result_num")
    private Integer wordsResultNum;
    @JsonProperty("direction")
    private Integer direction;
    /**
     * 唯一的log id，用于问题定位
     */
    @JsonProperty("log_id")
    private String logId;

    @NoArgsConstructor
    @Data
    public static class WordsResultDTO {
        @JsonProperty("words")
        private String words;
        @JsonProperty("location")
        private LocationDTO location;

        @NoArgsConstructor
        @Data
        public static class LocationDTO {
            @JsonProperty("top")
            private Integer top;
            @JsonProperty("left")
            private Integer left;
            @JsonProperty("width")
            private Integer width;
            @JsonProperty("height")
            private Integer height;
        }
    }
}
