Initiate InventoyTypes from a xlxs
Arrival mostly working
This commit is contained in:
@@ -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; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user