using System.Text.Json.Serialization;

namespace economy.Models.Price.Global.Commodity
{
    public class Response
    {
        [JsonPropertyName("name")]
        public string Name { get; set; }

        [JsonPropertyName("interval")]
        public string Interval { get; set; }

        [JsonPropertyName("unit")]
        public string Unit { get; set; }

        [JsonPropertyName("data")]
        public List<Data> Data { get; set; }
    }

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

        [JsonPropertyName("date")]
        public string Date { get; set; }

        [JsonPropertyName("value")]
        public string Value { get; set; }

        public decimal KRW { get; set; } = 0;
    }
}
