feat: Add full REST API with controllers, DTOs, and service layer

Add controllers for suppliers, stock items, jobs, cutting tools, and
packing. Refactor MaterialsController to use MaterialService with
dimension-aware CRUD, search, and bulk operations. Extract DTOs into
dedicated files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-05 16:53:53 -05:00
parent 21d50e7c20
commit 17f16901ef
13 changed files with 1919 additions and 87 deletions

View File

@@ -0,0 +1,45 @@
namespace CutList.Web.DTOs;
public class StandalonePackRequestDto
{
public List<PartInputDto> Parts { get; set; } = new();
public List<StockBinInputDto> StockBins { get; set; } = new();
public decimal Kerf { get; set; } = 0.125m;
public string Strategy { get; set; } = "advanced";
}
public class PartInputDto
{
public string Name { get; set; } = string.Empty;
public string Length { get; set; } = string.Empty;
public int Quantity { get; set; } = 1;
}
public class StockBinInputDto
{
public string Length { get; set; } = string.Empty;
public int Quantity { get; set; } = -1;
public int Priority { get; set; } = 25;
}
public class ParseLengthRequestDto
{
public string Input { get; set; } = string.Empty;
}
public class ParseLengthResponseDto
{
public double Inches { get; set; }
public string Formatted { get; set; } = string.Empty;
}
public class FormatLengthRequestDto
{
public double Inches { get; set; }
}
public class FormatLengthResponseDto
{
public string Formatted { get; set; } = string.Empty;
public double Inches { get; set; }
}