using System.Linq.Expressions;
using Monitoring.Core.Domain.FireDepartmentManagement;

namespace Monitoring.Features.AlarmFireDepartmentDispatches;

public record AlarmFireDepartmentDispatchModel(
	Guid Id,
	Guid AlarmId,
	Guid SenderId,
	DateTime SentAt,
	Guid DepartmentId,
	string DispatcherName,
	string Comment
)
{
	public static readonly Expression<
		Func<AlarmFireDepartmentDispatch, AlarmFireDepartmentDispatchModel>
	> FromEntity = e => new AlarmFireDepartmentDispatchModel(
		e.Id.Value,
		e.AlarmId.Value,
		e.SenderId.Value,
		e.SentAt,
		e.DepartmentId.Value,
		e.DispatcherName.Value,
		e.Comment.Value
	);
}
