using System.ComponentModel.DataAnnotations;
using AutoMapper;
using MileageTraker.Web.ViewModels.Vehicle;

namespace MileageTraker.Web.ViewModels
{
	public class DriverMileageFlattenedViewModel : VehicleMileageItem
	{
		[Display(Name = "Driver Name")]
		public string DriverName { get; set; }

		static DriverMileageFlattenedViewModel()
		{
			Mapper.CreateMap<VehicleMileageItem, DriverMileageFlattenedViewModel>();
		}

		public DriverMileageFlattenedViewModel(VehicleMileageItem vehicleMileage, string driverName)
		{
			Mapper.Map(vehicleMileage, this);
			DriverName = driverName;
		}
	}
}