namespace Hotline.Logger.Models
{
    /// <summary>
    /// 日志类
    /// </summary>
    public class AccModel : BaseLogModel
    {
        /// <summary>
        /// 时间间隔
        /// </summary>
        /// <returns></returns>
        public long Interval { get; set; }

        /// <summary>
        /// 方向 (Response, Request)
        /// </summary>
        public string Direction { get; set; } = string.Empty;

        /// <summary>
        /// 服务地址
        /// 请求/响应服务的地址
        /// </summary>
        public string ServiceUrl { get; set; }

        /// <summary>
        /// 被调用方法
        /// 被调用的方法，直接API地址
        /// </summary>
        public string Method { get; set; }

        /// <summary>
        /// 请求入参
        /// 请求（Request）的请求参数，响应时为空
        /// </summary>
        public string InParam { get; set; }

        /// <summary>
        /// 异常ID
        /// 调用服务有异常时，异常信息的日志ID，没异常日志时为空
        /// </summary>
        public string? ErrorId { get; set; }

        /// <summary>
        /// 返回值
        /// 响应结果
        /// </summary>
        public string OutResult { get; set; } = string.Empty;

        /// <summary>
        /// 用户
        /// </summary>
        public string User { get; set; }

        /// <summary>
        /// 用户字段Key
        /// </summary>
        public string UserKey = "user_display_name";
    }
}
