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

namespace OASystem.Domain.ViewModels.JuHeExchangeRate
{
    /// <summary>
    /// 聚合接口 Result
    /// </summary>
    public class JuHeAPIResult
    {
        /// <summary>
        /// 服务级错误码
        /// 202301	查询不到结果
        /// </summary>
        public int Error_code { get; set; }

        /// <summary>
        /// 系统级错误码
        /// 错误码  说明                 旧版本（resultcode）
        /// 10001	错误的请求KEY	     101
 	    /// 10002	该KEY无请求权限	     102
 	    /// 10003	KEY过期	             103
 	    /// 10004	错误的OPENID	     104
 	    /// 10005	应用未审核超时，请提交认证	105
 	    /// 10007	未知的请求源	     107
 	    /// 10008	被禁止的IP	         108
 	    /// 10009	被禁止的KEY	         109
 	    /// 10011	当前IP请求超过限制	 111
 	    /// 10012	请求超过次数限制	 112
 	    /// 10013	测试KEY超过请求限制	 113
 	    /// 10014	系统内部异常(调用充值类业务时，请务必联系客服或通过订单查询接口检测订单，避免造成损失)    114
 	    /// 10020	接口维护	         120
 	    /// 10021	接口停用	         121
        /// </summary>
        public string? Resultcode { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        public string? Reason { get; set; }

        /// <summary>
        /// 数据源
        /// </summary>
        public object? Result { get; set; }
    }

    /// <summary>
    /// 汇率接口 返回实体类
    /// </summary>
    public class ExchangeRateModel
    {
        /// <summary>
        /// 货币名称
        /// </summary>
        public string? Name { get; set; }

        /// <summary>
        /// 现汇买入价
        /// </summary>
        public string? FBuyPri { get; set; }

        /// <summary>
        /// 现钞买入价
        /// </summary>
        public string? MBuyPri { get; set; }

        /// <summary>
        /// 现汇卖出价
        /// </summary>
        public string? FSellPri { get; set; }

        /// <summary>
        /// 现钞卖出价
        /// </summary>
        public string? MSellPri { get; set; }

        /// <summary>
        /// 银行折算价/中间价
        /// </summary>
        public string? BankConversionPri { get; set; }

        /// <summary>
        /// 发布日期
        /// </summary>
        public string? Date { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        public string? Time { get; set; }
    }


    /// <summary>
    /// 汇率 币种Model
    /// </summary>
    public record RateCurrencyModel
    {
        /// <summary>
        /// 币种名称
        /// </summary>
        public string CurrencyName { get; set; }

        /// <summary>
        /// 币种Code
        /// </summary>
        public string CurrencyCode{ get; set; }
    }
}
