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

namespace Monitoring.Features.CheckListManagement;

public sealed record CheckListTemplateItemTranslationModel(
	Guid Id,
	string LanguageCode,
	string Name,
	string Description
)
{
	public static CheckListTemplateItemTranslationModel FromEntity(
		CheckListTemplateItemTranslation entity
	)
	{
		return new(entity.Id.Value, entity.LanguageCode, entity.Name, entity.Description);
	}

	public static Expression<
		Func<CheckListTemplateItemTranslation, CheckListTemplateItemTranslationModel>
	> Projection => x => new(x.Id.Value, x.LanguageCode, x.Name, x.Description);
}
