package com.hotwj.platform.integration.ocr.baidu;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "ext.baidu.ocr")
public class BaiduOcrProperties {
    private String apiKey;
    private String secretKey;
    private String tokenUrl = "https://aip.baidubce.com/oauth/2.0/token";

    // Default endpoints
    private String businessLicenseUrl = "https://aip.baidubce.com/rest/2.0/ocr/v1/business_license";
    private String idCardUrl = "https://aip.baidubce.com/rest/2.0/ocr/v1/idcard";
    private String vehicleLicenseUrl = "https://aip.baidubce.com/rest/2.0/ocr/v1/vehicle_license";
    private String drivingLicenseUrl = "https://aip.baidubce.com/rest/2.0/ocr/v1/driving_license";
    private String handwritingUrl = "https://aip.baidubce.com/rest/2.0/ocr/v1/handwriting";
    private Integer tokenTimeoutMs = 2000;
    private Integer handwritingTimeoutMs = 5000;
    private Integer retryTimes = 2;
}
