Search.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System.Text.Json.Serialization;
  2. namespace goods.Models.Coupang.Search
  3. {
  4. public class Response
  5. {
  6. [JsonPropertyName("rCode")]
  7. public string RCode { get; set; } = null!;
  8. [JsonPropertyName("rMessage")]
  9. public string RMessage { get; set; } = null!;
  10. [JsonPropertyName("data")]
  11. public DataContainer? Data { get; set; } // data를 별도 객체로 매핑
  12. }
  13. public class DataContainer
  14. {
  15. [JsonPropertyName("landingUrl")]
  16. public string? LandingUrl { get; set; }
  17. [JsonPropertyName("productData")]
  18. public List<Data>? ProductData { get; set; } // productData를 List로 매핑
  19. }
  20. public class Data
  21. {
  22. [JsonPropertyName("keyword")]
  23. public string Keyword { get; set; } = null!;
  24. [JsonPropertyName("rank")]
  25. public int Rank { get; set; }
  26. [JsonPropertyName("isRocket")]
  27. public bool IsRocket { get; set; }
  28. [JsonPropertyName("isFreeShipping")]
  29. public bool IsFreeShipping { get; set; }
  30. [JsonPropertyName("productId")]
  31. public long ProductId { get; set; }
  32. [JsonPropertyName("productImage")]
  33. public string ProductImage { get; set; } = null!;
  34. [JsonPropertyName("productName")]
  35. public string ProductName { get; set; } = null!;
  36. [JsonPropertyName("productPrice")]
  37. public int ProductPrice { get; set; }
  38. [JsonPropertyName("productUrl")]
  39. public string ProductUrl { get; set; } = null!;
  40. }
  41. }