using System.Text.Json.Serialization; namespace OASystem.API.OAMethodLib.FileProcessing { public class WordDocumentModels { } /// /// Word文档信息模型 /// public class WordDocumentInfo { [JsonPropertyName("title")] public string Title { get; set; } = string.Empty; [JsonPropertyName("content")] public string Content { get; set; } = string.Empty; [JsonPropertyName("metadata")] public DocumentMetadata Metadata { get; set; } = new DocumentMetadata(); [JsonPropertyName("tables")] public List Tables { get; set; } = new List(); [JsonPropertyName("formFields")] public List FormFields { get; set; } = new List(); [JsonPropertyName("sections")] public List Sections { get; set; } = new List(); [JsonPropertyName("imagesCount")] public int ImagesCount { get; set; } [JsonPropertyName("processingTimeMs")] public long ProcessingTimeMs { get; set; } } /// /// 文档元数据 /// public class DocumentMetadata { [JsonPropertyName("author")] public string Author { get; set; } = string.Empty; [JsonPropertyName("company")] public string Company { get; set; } = string.Empty; [JsonPropertyName("createdTime")] public DateTime? CreatedTime { get; set; } [JsonPropertyName("lastSavedTime")] public DateTime? LastSavedTime { get; set; } [JsonPropertyName("pageCount")] public int PageCount { get; set; } [JsonPropertyName("wordCount")] public int WordCount { get; set; } [JsonPropertyName("characterCount")] public int CharacterCount { get; set; } [JsonPropertyName("subject")] public string Subject { get; set; } = string.Empty; [JsonPropertyName("keywords")] public string Keywords { get; set; } = string.Empty; } /// /// 文档表格 /// public class DocumentTable { [JsonPropertyName("tableName")] public string TableName { get; set; } = string.Empty; [JsonPropertyName("rows")] public List> Rows { get; set; } = new List>(); [JsonPropertyName("headers")] public List Headers { get; set; } = new List(); } /// /// 表单字段 /// public class FormField { [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; [JsonPropertyName("type")] public string Type { get; set; } = string.Empty; [JsonPropertyName("value")] public string Value { get; set; } = string.Empty; [JsonPropertyName("isChecked")] public bool IsChecked { get; set; } } /// /// 文档章节 /// public class DocumentSection { [JsonPropertyName("sectionNumber")] public int SectionNumber { get; set; } [JsonPropertyName("content")] public string Content { get; set; } = string.Empty; [JsonPropertyName("paragraphsCount")] public int ParagraphsCount { get; set; } [JsonPropertyName("tablesCount")] public int TablesCount { get; set; } } /// /// 处理结果 /// public class ProcessingResult { [JsonPropertyName("success")] public bool Success { get; set; } [JsonPropertyName("data")] public WordDocumentInfo? Data { get; set; } [JsonPropertyName("errorMessage")] public string? ErrorMessage { get; set; } [JsonPropertyName("fileSize")] public long FileSize { get; set; } [JsonPropertyName("fileType")] public string FileType { get; set; } = string.Empty; } }