using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XYY.Service.Standard.Finance.Charging.EUExchange
{
    public class EUExchangeBase
    {

        public EUExchangeBase(string country, DateTime startTime, double rate)
        {
            if (string.IsNullOrEmpty(country))
                throw new ArgumentNullException("需要传入国家");
            if (startTime==DateTime.MinValue)
                throw new ArgumentNullException("需要传入起始时间");
            this.ReceiveryCountryCode = country;
            this.DateTimeVersion = int.Parse(startTime.ToString("yyyyMMdd"));
            this.Rate = rate;
            this.Key = "EUExchange" + this.ReceiveryCountryCode;
        }

        public string Key
        {
            get; set;
        }

        /// <summary>
        /// 国家
        /// </summary>
        public string ReceiveryCountryCode
        {
            get; set;
        }

        /// <summary>
        /// 时间版本
        /// </summary>
        public long DateTimeVersion
        {
            get; set;
        }

        /// <summary>
        /// 税率
        /// </summary>
        public double Rate
        {
            get; set;
        }
    }
}
