Add PurchaseItem entity with status tracking (Pending/Ordered/Received), supplier and job relationships. Add LockedAt timestamp to Job entity for controlling editability after materials are ordered. Includes PurchaseItemService (CRUD + bulk create), JobService Lock/Unlock methods, EF Core migrations, and DI registration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
736 B
C#
30 lines
736 B
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CutList.Web.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddJobLockedAt : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "LockedAt",
|
|
table: "Jobs",
|
|
type: "datetime2",
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "LockedAt",
|
|
table: "Jobs");
|
|
}
|
|
}
|
|
}
|