feat: drop QuantityOnHand column and StockTransactions table

Final step of removing inventory quantity tracking - see
docs/superpowers/specs/2026-08-01-remove-inventory-quantity-tracking-design.md.
Destructive to any existing on-hand/transaction data; confirmed
acceptable since nothing read it automatically.
This commit is contained in:
aj
2026-08-01 11:04:11 -04:00
parent 383fa19cf2
commit 6bdbdf4969
6 changed files with 693 additions and 109 deletions
-2
View File
@@ -6,12 +6,10 @@ public class StockItem
public int MaterialId { get; set; }
public decimal LengthInches { get; set; }
public string? Name { get; set; }
public int QuantityOnHand { get; set; } = 0;
public string? Notes { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime? UpdatedAt { get; set; }
public Material Material { get; set; } = null!;
public ICollection<StockTransaction> Transactions { get; set; } = new List<StockTransaction>();
}
@@ -1,24 +0,0 @@
namespace CutList.Web.Data.Entities;
public class StockTransaction
{
public int Id { get; set; }
public int StockItemId { get; set; }
public int Quantity { get; set; }
public StockTransactionType Type { get; set; }
public int? JobId { get; set; }
public string? Notes { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public StockItem StockItem { get; set; } = null!;
public Job? Job { get; set; }
}
public enum StockTransactionType
{
Received,
Used,
Adjustment,
Scrapped,
Returned
}