using e_suite.API.Common.models;

namespace e_suite.Modules.ExceptionLogManager.Extensions;

public static class ExceptionLogExtension
{
    public static ExceptionLog ToExceptionLog(this Database.Core.Tables.Diagnostics.ExceptionLog exceptionLog)
    {
        return new ExceptionLog
        {
            Id = exceptionLog.Id,
            Application = exceptionLog.Application,
            ExceptionJson = exceptionLog.ExceptionJson,
            Message = exceptionLog.Message,
            OccuredAt = exceptionLog.OccuredAt,
            StackTrace = exceptionLog.StackTrace,
            SupportingData = exceptionLog.SupportingData
        };
    }
}
