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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user