using System;
using System.ComponentModel.DataAnnotations;
using AutoMapper;
using InventoryTraker.Web.Core;

namespace InventoryTraker.Web.Models
{
	public class InventoryAddForm
	{
		[Required]
		public string Id { get; set; }

		[Required]
		public string ProgramName { get; set; }

		public string ProgramSubtype { get; set; }

		public string Description { get; set; }

		[Required]
		public DateTime ShredReadyDate { get; set; }

		[Required]
		public DateTime AddedDate { get; set; }

		public string Memo { get; set; }

		public class AutoMapperProfile : Profile
		{
			public AutoMapperProfile()
			{
				CreateMap<InventoryAddForm, Inventory>()
					.AfterMap((form, inventory) => { inventory.Quantity = 1; });
			}
		}
	}
}