Oil.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System.Text.Json.Serialization;
  2. namespace economy.Models.Price.Domestic.Oil
  3. {
  4. // 검색결과 변수
  5. public class Response
  6. {
  7. [JsonPropertyName("header")]
  8. public Header Header { get; set; }
  9. [JsonPropertyName("body")]
  10. public Body Body { get; set; }
  11. }
  12. public class Header
  13. {
  14. [JsonPropertyName("resultCode")]
  15. public string ResultCode { get; set; }
  16. [JsonPropertyName("resultMsg")]
  17. public string ResultMsg { get; set; }
  18. }
  19. public class Body
  20. {
  21. [JsonPropertyName("numOfRows")]
  22. public int NumberOfRows { get; set; }
  23. [JsonPropertyName("pageNo")]
  24. public int PageNo { get; set; }
  25. [JsonPropertyName("totalCount")]
  26. public int TotalCount { get; set; }
  27. [JsonPropertyName("items")]
  28. public Items Items { get; set; }
  29. }
  30. public class Items
  31. {
  32. [JsonPropertyName("item")]
  33. public List<Item> ItemList { get; set; }
  34. }
  35. public class Item
  36. {
  37. public int Num { get; set; }
  38. [JsonPropertyName("basDt")]
  39. public string BasDt { get; set; } // 기준일자
  40. [JsonPropertyName("oilCtg")]
  41. public string OilCtg { get; set; } // 유종구분
  42. [JsonPropertyName("wtAvgPrcCptn")]
  43. public string WtAvgPrcCptn { get; set; } // 가중평균가격 경쟁
  44. [JsonPropertyName("wtAvgPrcDisc")]
  45. public string WtAvgPrcDisc { get; set; } // 가중평균가격 협의
  46. [JsonPropertyName("trqu")]
  47. public string Trqu { get; set; } // 거래량
  48. [JsonPropertyName("trPrc")]
  49. public string TrPrc { get; set; } // 거래대금
  50. }
  51. }