using Microsoft.AspNetCore.Mvc; using System.ComponentModel.DataAnnotations; namespace economy.Models.Price.Global.NaturalGas { /* * 천연가스 * 예시 ) https://www.alphavantage.co/query?function=NATURAL_GAS&interval=monthly&apikey=EFOBUHL5SFLBF2LN */ // 검색요청 변수 public class Request { [BindProperty(Name = "page", SupportsGet = true)] [Range(1, int.MaxValue, ErrorMessage = "페이지 허용량을 초과하였습니다.")] public int PageNo { get; set; } = 1; [BindProperty(Name = "perPage", SupportsGet = true)] [Range(1, int.MaxValue, ErrorMessage = "출력 허용량을 초과하였습니다.")] public int NumOfRows { get; set; } = 10; [ViewData] [BindProperty(Name = "interval", SupportsGet = true)] [Required(ErrorMessage = "검색 구간을 입력해주세요.")] [StringLength(120, ErrorMessage = "검색 구간을 초과하였습니다.")] public required string Interval { get; set; } = "daily"; // weekly, monthly } }