using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace InventoryTraker.Web.Core
{
	// AKA Commodity
	public class InventoryType 
	{
		[DatabaseGenerated(DatabaseGeneratedOption.None)]
		public string Id { get; set; }

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

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

		[Required]
		public string ContainerType { get; set; }
		
		public double WeightPerCase { get; set; }

		public decimal PricePerCase { get; set; }
	}

	public class Inventory
	{
		public int Id { get; set; }

		public virtual InventoryType InventoryType { get; set; }

		public virtual ICollection<Transaction>	 Transactions { get; set; }

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

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

		public string Memo { get; set; }
	}

	public class Transaction
	{
		public int Id { get; set; }

		public virtual Inventory Inventory { get; set; }

		public int AddedQuantity { get; set; }

		public int RemovedQuantity { get; set; }

		public DateTime TransactionDate { get; set; }

		public string Memo { get; set; }

	}
}