using System.Text.Json.Serialization;

namespace economy.Models.Price.Domestic.Flower
{
    // 검색결과 변수
    public class Response
    {
        [JsonPropertyName("resultCd")]
        public string ResultCode { get; set; }

        [JsonPropertyName("resultMsg")]
        public string ResultMsg { get; set; }

        [JsonPropertyName("numOfRows")]
        [JsonConverter(typeof(FlexibleTypeConverter<int>))]
        public int NumberOfRows { get; set; }

        [JsonPropertyName("items")]
        public List<Item> Items { get; set; }
    }

    public class Item
    {
        public int Num { get; set; }

        [JsonPropertyName("saleDate")]
        public string SaleDate { get; set; } // 경매일자

        [JsonPropertyName("flowerGubn")]
        public string FlowerGubn { get; set; } // 화훼부류명

        [JsonPropertyName("pumName")]
        public string PumName { get; set; } // 품목명

        [JsonPropertyName("goodName")]
        public string GoodName { get; set; } // 품종명

        [JsonPropertyName("lvNm")]
        public string LvNm { get; set; } // 등급명

        [JsonPropertyName("maxAmt")]
        public string MaxAmt { get; set; } // 최고가

        [JsonPropertyName("minAmt")]
        public string MinAmt { get; set; } // 최저가

        [JsonPropertyName("avgAmt")]
        public string AvgAmt { get; set; } // 평균가

        [JsonPropertyName("totAmt")]
        public string TotAmt { get; set; } // 총금액

        [JsonPropertyName("totQty")]
        public string TotQty { get; set; } // 총물량
    }
}
