using System;
using System.ComponentModel.DataAnnotations;

namespace InventoryTraker.Web.Core
{
	public class Transaction
	{
		public int Id { get; set; }

		public virtual Inventory Inventory { get; set; }

		public TransactionType TransactionType { get; set; }

		[Required]
		public int AddedQuantity { get; set; }

		[Required]
		public int RemovedQuantity { get; set; }

		[Required]
		public int CurrentQuantity { get; set; }

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

		public string Memo { get; set; }

		/// <summary>
		/// Used only when inventory was distributed
		/// </summary>
		public string Destination { get; set; }

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