using System.Linq.Expressions;

using Monitoring.Core.Domain;

namespace Monitoring.Features.ResponsiblePersons;

public record ResponsiblePersonModel(
	Guid Id,
	string Name,
	string Key,
	string Phone1,
	string Phone2,
	string Note,
	Guid AssetId
)
{
	public static readonly Expression<Func<ResponsiblePerson, ResponsiblePersonModel>> FromEntity = entity => new ResponsiblePersonModel(
		entity.Id,
		entity.Name,
		entity.Key,
		entity.Phone1,
		entity.Phone2,
		entity.Note,
		entity.Asset.Id.Value
	);
}
