using NetworkResurrector.Api.Domain.Entities;
using NetworkResurrector.Api.Domain.Models.Notifications;

namespace NetworkResurrector.Api.Application.Extensions
{
    internal static class EntityExtensions
    {
        public static NotificationContext ToNotificationContext(this Machine machine, string actionStatus = null, string actionPerformer = null)
        {
            return new NotificationContext()
            {
                MachineName = machine.MachineName,
                MachineFullName = machine.FullMachineName,
                MachineIP = machine.IPv4Address,
                ActionStatus = actionStatus,
                ActionPerformer = actionPerformer
            };
        }
    }
}
