using System;

namespace Quadarax.Foundation.Core.Data
{

    /// <summary>
    /// Defines error message structure
    /// </summary>
    public interface IError
    {
        /// <summary>
        /// Full error message
        /// </summary>
        public string Message { get; }
        /// <summary>
        /// Error message short numeric code
        /// </summary>
        public int Code { get; }
        /// <summary>
        /// Defines error level
        /// </summary>
        public ErrorLevelEnum Level { get; }

        /// <summary>
        /// Timestamp of the error
        /// </summary>
        public DateTime Timestamp { get; }
    }

    /// <summary>
    /// Error levels enumeration
    /// </summary>
    public enum ErrorLevelEnum
    {
        Note,
        Warning,
        Error,
        Critical,
        Fatal
    }
}
