refactor: Update controllers for new Material model

MaterialsController:
- Update to use MaterialShape enum
- Add Type and Grade to imports
- Fix display name formatting

SeedController:
- Update seed data to use MaterialShape enum
- Add MaterialType assignments

CuttingTool:
- Add Notes property

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-04 23:38:21 -05:00
parent 6388e003d3
commit 0e5b63c557
3 changed files with 21 additions and 10 deletions

View File

@@ -63,7 +63,7 @@ public class SeedController : ControllerBase
foreach (var size in sizes)
{
var exists = await _context.Materials
.AnyAsync(m => m.Shape == "Round Bar" && m.Size == size && m.IsActive);
.AnyAsync(m => m.Shape == MaterialShape.RoundBar && m.Size == size && m.IsActive);
if (exists)
{
@@ -73,7 +73,7 @@ public class SeedController : ControllerBase
_context.Materials.Add(new Material
{
Shape = "Round Bar",
Shape = MaterialShape.RoundBar,
Size = size,
Description = "1018 Cold Finished",
CreatedAt = DateTime.UtcNow