using System.Xml.Serialization;

namespace economy.Models.Business.Number
{
    [XmlRoot("Response")]
    public class Response
    {
        [XmlElement("RequestCnt")]
        public int RequestCnt { get; set; }

        [XmlElement("StatusCode")]
        public string StatusCode { get; set; }

        [XmlArray("Data")]
        [XmlArrayItem("Item")]
        public List<Item> Data { get; set; } = new List<Item>();
    }

    public class Item
    {
        // 사업자등록번호
        [XmlElement("BNo")]
        public string BNo { get; set; }

        // 납세자상태(명칭)
        [XmlElement("BStt")]
        public string? BStt { get; set; }

        // 납세자상태(코드)
        [XmlElement("BSttCd")]
        public string? BSttCd { get; set; }

        // 과세유형메세지(명칭)
        [XmlElement("TaxType")]
        public string? TaxType { get; set; }

        // 과세유형메세지(코드)
        [XmlElement("TaxTypeCd")]
        public string? TaxTypeCd { get; set; }

        // 폐업일
        [XmlElement("EndDt")]
        public string? EndDt { get; set; }

        // 단위과세전환폐업여부(Y, N)
        [XmlElement("UtccYn")]
        public string? UtccYn { get; set; }

        // 최근과세유형전환일자
        [XmlElement("TaxTypeChangeDt")]
        public string? TaxTypeChangeDt { get; set; }

        // 세금계산서적용일자
        [XmlElement("StaxInvoicePrintYnDt")]
        public string? StaxInvoicePrintYnDt { get; set; }

        // 직전과세유형메세지(명칭)
        /**
         * 01:부가가치세 일반과세자,
         * 02:부가가치세 간이과세자,
         * 07:부가가치세 간이과세자(세금계산서 발급사업자),
         * 99:해당없음
         */
        [XmlElement("RbfTaxType")]
        public string? RbfTaxType { get; set; }

        // 직전과세유형메세지(코드)
        [XmlElement("RbfTaxTypeCd")]
        public string? RbfTaxTypeCd { get; set; }
    }
}
