using Newtonsoft.Json; using Swashbuckle.AspNetCore.Annotations; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FlexJobApi.Core { /// /// 百度文字识别结果 /// public class BaiduOcrIdentityBackResult { /// /// 地址 /// public string Url { get; set; } /// /// 模型 /// public BaiduOcrIdentityBackResultModel Model { get; set; } /// /// 错误码 /// [JsonProperty("error_code")] public string ErrorCode { get; set; } /// /// 错误消息 /// [JsonProperty("error_msg")] public string ErrorMessage { get; set; } /// /// 文字结果 /// [JsonProperty("words_result")] public Dictionary WordsResult { get; set; } } /// /// 百度文字识别结果 /// public class BaiduOcrIdentityBackResultModel { /// /// 失效日期 /// [JsonIgnore, SwaggerIgnore] public string ExpiryDateText { get; set; } /// /// 失效日期 /// public DateTime? ExpiryDate => ExpiryDateText?.ToDateTime("yyyyMMdd"); /// /// 签发机关 /// public string IssueAuthority { get; set; } /// /// 签发日期 /// [JsonIgnore, SwaggerIgnore] public string IssueDateText { get; set; } /// /// 签发日期 /// public DateTime? IssueDate => IssueDateText?.ToDateTime("yyyyMMdd"); } }