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


import com.fasterxml.jackson.annotation.JsonProperty;
import com.heyu.api.baidu.response.BBaseResp;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * https://console.bce.baidu.com/support/?_=1740219852952&timestamp=1740308886691#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E5%8D%A1%E8%AF%81OCR&api=rest%2F2.0%2Focr%2Fv1%2Fsocial_security_card&method=post
 *社保卡识别
 *
 *{
 *     "direction": "0",
 *     "words_result": {
 *         "sex": {
 *             "word": "男"
 *         },
 *         "birth_date": {
 *             "word": "1993年6月16日"
 *         },
 *         "issue_date": {
 *             "word": ""
 *         },
 *         "name": {
 *             "word": "徐乐"
 *         },
 *         "card_number": {
 *             "word": "122932663447"
 *         },
 *         "bank_card_number": {
 *             "word": ""
 *         },
 *         "expiry_date": {
 *             "word": ""
 *         },
 *         "social_security_number": {
 *             "word": "130201199306168223"
 *         }
 *     },
 *     "log_id": 1438866840412542540
 * }
 *
 */
@NoArgsConstructor
@Data
public class BSocialSecurityCardResp extends BBaseResp {


    @JsonProperty("direction")
    private String direction;
    @JsonProperty("words_result")
    private WordsResultDTO wordsResult;
    @JsonProperty("log_id")
    private Long logId;

    @NoArgsConstructor
    @Data
    public static class WordsResultDTO {
        @JsonProperty("sex")
        private SexDTO sex;
        @JsonProperty("birth_date")
        private BirthDateDTO birthDate;
        @JsonProperty("issue_date")
        private IssueDateDTO issueDate;
        @JsonProperty("name")
        private NameDTO name;
        @JsonProperty("card_number")
        private CardNumberDTO cardNumber;
        @JsonProperty("bank_card_number")
        private BankCardNumberDTO bankCardNumber;
        @JsonProperty("expiry_date")
        private ExpiryDateDTO expiryDate;
        @JsonProperty("social_security_number")
        private SocialSecurityNumberDTO socialSecurityNumber;

        @NoArgsConstructor
        @Data
        public static class SexDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class BirthDateDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class IssueDateDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class NameDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class CardNumberDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class BankCardNumberDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class ExpiryDateDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class SocialSecurityNumberDTO {
            @JsonProperty("word")
            private String word;
        }
    }
}
