package com.ruoyi.common.valid.towEle.vo;

import lombok.Data;

@Data
public class IDResponse {

    private int error_code;

    private String reason;

    private Result result;

    private String sn;

    @Data
    public class Result {
        private String realname;

        private String idcard;

        private Boolean isok;

        private IdCardInfor IdCardInfor;

    }

    @Data
    public class IdCardInfor {
        private String province;

        private String city;

        private String district;

        private String area;

        private String sex;

        private String birthday;

    }

    public static boolean isSuccess(IDResponse response) {
        return response != null && response.getError_code() == 0 && response.getResult() != null && response.getResult().getIsok();
    }
}
