PromotionQuerySampleDTO.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 ip { get; set; } = string.Empty;
  12. public string oaid { get; set; } = string.Empty;
  13. public string image_base64 { get; set; } = string.Empty;
  14. public string response_json { get; set; } = string.Empty;
  15. [IgnoreUpdate]
  16. [JsonConverter(typeof(NullableDateTimeConverter))]
  17. public DateTime create_time { get; set; }
  18. }
  19. public class PromotionQuerySampleLogDTO
  20. {
  21. public string id { get; set; } = string.Empty;
  22. public string fileName { get; set; } = string.Empty;
  23. public string writeTime { get; set; } = string.Empty;
  24. public string content { get; set; } = string.Empty;
  25. public string ip { get; set; } = string.Empty;
  26. public string oaid { get; set; } = string.Empty;
  27. public string imageBase64 { get; set; } = string.Empty;
  28. public string responseJson { get; set; } = string.Empty;
  29. }
  30. public class PromotionQuerySampleQueryResultDTO
  31. {
  32. public int page { get; set; } = 1;
  33. public int pageSize { get; set; }
  34. public int totalCount { get; set; }
  35. public int totalPages => pageSize <= 0 || totalCount <= 0 ? 0 : (int)Math.Ceiling(totalCount / (double)pageSize);
  36. public List<PromotionQuerySampleLogDTO> logs { get; set; } = new();
  37. }
  38. }