using System;
using System.ComponentModel.DataAnnotations;
using AutoMapper;
using LeafWeb.Core.Entities;

namespace LeafWeb.WebCms.Models
{
	public class LeafInputStatusViewModel
	{
		public int Id { get; set; }
		[UIHint("Status")]
		public string Status { get; set; }
		public string Description { get; set; }
		public string Details { get; set; }
		public DateTime DateTime { get; set; }

		static LeafInputStatusViewModel()
		{
			Mapper.CreateMap<LeafInputStatus, LeafInputStatusViewModel>()
				.ForMember(dest => dest.Status, opt => opt.MapFrom(li => li.Status.ToString()));
		}

		public LeafInputStatusViewModel() { }

		public LeafInputStatusViewModel(LeafInputStatus status)
		{
			Mapper.Map(status, this);
		}
	}
}