Initiate InventoyTypes from a xlxs

Arrival mostly working
This commit is contained in:
2016-08-22 11:03:00 -04:00
parent 7e4d8a6d2a
commit 53ed1b3af9
40 changed files with 798 additions and 208 deletions
+4 -38
View File
@@ -1,61 +1,27 @@
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; }
public virtual ICollection<Transaction> Transactions { get; set; }
[Required]
public DateTime ExpirationDate { get; set; }
[Required]
public DateTime AddedDate { 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; }
}
}
+25
View File
@@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations;
namespace InventoryTraker.Web.Core
{
public class InventoryType
{
public int Id { get; set; }
[Required]
public string Identifier { 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; }
}
}
+26
View File
@@ -0,0 +1,26 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace InventoryTraker.Web.Core
{
public class Transaction
{
public int Id { get; set; }
public virtual Inventory Inventory { get; set; }
[Required]
public int AddedQuantity { get; set; }
[Required]
public int RemovedQuantity { get; set; }
[Required]
public DateTime TransactionDate { get; set; }
public string Memo { get; set; }
[Required]
public DateTime Timestamp { get; set; }
}
}