feat: Add stock transaction tracking system
- Add StockTransaction entity for audit trail - Track received, used, adjusted, scrapped, and returned stock - Include unit price tracking for cost analysis - Link transactions to jobs and suppliers Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
27
CutList.Web/Data/Entities/StockTransaction.cs
Normal file
27
CutList.Web/Data/Entities/StockTransaction.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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 int? SupplierId { get; set; }
|
||||
public decimal? UnitPrice { 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 Supplier? Supplier { get; set; }
|
||||
}
|
||||
|
||||
public enum StockTransactionType
|
||||
{
|
||||
Received,
|
||||
Used,
|
||||
Adjustment,
|
||||
Scrapped,
|
||||
Returned
|
||||
}
|
||||
Reference in New Issue
Block a user