PromotionQuerySampleDTO.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using dodohold.core;
  2. using System.Text.Json.Serialization;
  3. using YunhuiKit;
  4. namespace molilian.core
  5. {
  6. [Table("promotion_query_samples")]
  7. public class PromotionQuerySampleDTO
  8. {
  9. [Key]
  10. public string id { get; set; } = string.Empty;
  11. public string image_base64 { get; set; } = string.Empty;
  12. public string response_json { get; set; } = string.Empty;
  13. [IgnoreUpdate]
  14. [JsonConverter(typeof(NullableDateTimeConverter))]
  15. public DateTime create_time { get; set; }
  16. }
  17. public class PromotionQuerySampleLogDTO
  18. {
  19. public string id { get; set; } = string.Empty;
  20. public string fileName { get; set; } = string.Empty;
  21. public string writeTime { get; set; } = string.Empty;
  22. public string content { get; set; } = string.Empty;
  23. public string imageBase64 { get; set; } = string.Empty;
  24. public string responseJson { get; set; } = string.Empty;
  25. }
  26. public class PromotionQuerySampleQueryResultDTO
  27. {
  28. public int page { get; set; } = 1;
  29. public int pageSize { get; set; }
  30. public int totalCount { get; set; }
  31. public int totalPages => pageSize <= 0 || totalCount <= 0 ? 0 : (int)Math.Ceiling(totalCount / (double)pageSize);
  32. public List<PromotionQuerySampleLogDTO> logs { get; set; } = new();
  33. }
  34. }