using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TellerSystem.Communication;

namespace TellerSystem.Contract.Contracts
{
    public interface IPaymentFeeContract
    {
        /// <summary>
        /// 检查收费情况，是否需要进行收费
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        bool CheckFee(PaymentFeeArguments args, out bool isPaymentFee);

        /// <summary>
        /// 执行收费决策界面
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        bool RaisePaymentFee(PaymentFeeArguments args);
    }

    public class PaymentFeeArguments
    {
        #region ctor
        public PaymentFeeArguments(Message message)
        {
            Message = message;
            Metadata = new Dictionary<string, object>();
        }
        #endregion

        #region 属性
        /// <summary>
        /// 通讯报文
        /// </summary>
        public Message Message { get; private set; }

        /// <summary>
        /// 元数据集合
        /// </summary>
        public Dictionary<string, object> Metadata { get; private set; }
        #endregion
    }
}
