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

namespace Monitoring.Features.CameraViews;

public record CameraViewModel(
	Guid Id,
	Guid UserId,
	Guid CameraId,
	Guid AlarmId,
	DateTime DateTime,
	DateTime StartVideo,
	DateTime EndVideo
)
{
	public static readonly Expression<Func<CameraView, CameraViewModel>> FromEntity = entity => new CameraViewModel(
		entity.Id.Value,
		entity.UserId.Value,
		entity.CameraId.Value,
		entity.AlarmId.Value,
		entity.DateTime,
		entity.StartVideo,
		entity.EndVideo
	);
};
