Update invoice model snapshot
This commit is contained in:
@@ -536,6 +536,55 @@ namespace Distribution.Migrations
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Distribution.Models.Invoice", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedAt")
|
||||||
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
|
b.Property<Guid>("CreatedByUserId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<Guid>("FK_OrderId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("FinalizedAt")
|
||||||
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("FinalizedByUserId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsActive")
|
||||||
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("PrintedAt")
|
||||||
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("PrintedByUserId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<decimal>("TotalAmount")
|
||||||
|
.HasColumnType("decimal(65,30)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CreatedByUserId");
|
||||||
|
|
||||||
|
b.HasIndex("FK_OrderId");
|
||||||
|
|
||||||
|
b.HasIndex("FinalizedByUserId");
|
||||||
|
|
||||||
|
b.HasIndex("PrintedByUserId");
|
||||||
|
|
||||||
|
b.ToTable("Invoices");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Distribution.Models.Item", b =>
|
modelBuilder.Entity("Distribution.Models.Item", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@@ -768,10 +817,19 @@ namespace Distribution.Migrations
|
|||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("ConfirmedAt")
|
||||||
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ConfirmedByUserId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
b.Property<DateTime>("CreatedAt")
|
||||||
.HasColumnType("datetime(6)");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<Guid>("FK_SaleId")
|
b.Property<Guid>("CreatedByUserId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("FK_SaleId")
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
b.Property<Guid>("FK_StoreId")
|
b.Property<Guid>("FK_StoreId")
|
||||||
@@ -780,6 +838,10 @@ namespace Distribution.Migrations
|
|||||||
b.Property<DateTime?>("FulfilledAt")
|
b.Property<DateTime?>("FulfilledAt")
|
||||||
.HasColumnType("datetime(6)");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("InvoiceId")
|
||||||
|
.HasColumnType("char(36)")
|
||||||
|
.HasColumnName("InvoiceId");
|
||||||
|
|
||||||
b.Property<bool>("IsActive")
|
b.Property<bool>("IsActive")
|
||||||
.HasColumnType("tinyint(1)");
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
@@ -794,6 +856,10 @@ namespace Distribution.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ConfirmedByUserId");
|
||||||
|
|
||||||
|
b.HasIndex("CreatedByUserId");
|
||||||
|
|
||||||
b.HasIndex("FK_SaleId")
|
b.HasIndex("FK_SaleId")
|
||||||
.IsUnique();
|
.IsUnique();
|
||||||
|
|
||||||
@@ -806,6 +872,7 @@ namespace Distribution.Migrations
|
|||||||
{
|
{
|
||||||
Id = new Guid("33000000-0000-0000-0000-000000000001"),
|
Id = new Guid("33000000-0000-0000-0000-000000000001"),
|
||||||
CreatedAt = new DateTime(2026, 8, 25, 9, 0, 0, 0, DateTimeKind.Unspecified),
|
CreatedAt = new DateTime(2026, 8, 25, 9, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
CreatedByUserId = new Guid("29000000-0000-0000-0000-000000000002"),
|
||||||
FK_SaleId = new Guid("32000000-0000-0000-0000-000000000001"),
|
FK_SaleId = new Guid("32000000-0000-0000-0000-000000000001"),
|
||||||
FK_StoreId = new Guid("26000000-0000-0000-0000-000000000001"),
|
FK_StoreId = new Guid("26000000-0000-0000-0000-000000000001"),
|
||||||
FulfilledAt = new DateTime(2026, 8, 25, 13, 0, 0, 0, DateTimeKind.Unspecified),
|
FulfilledAt = new DateTime(2026, 8, 25, 13, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
@@ -818,6 +885,7 @@ namespace Distribution.Migrations
|
|||||||
{
|
{
|
||||||
Id = new Guid("33000000-0000-0000-0000-000000000002"),
|
Id = new Guid("33000000-0000-0000-0000-000000000002"),
|
||||||
CreatedAt = new DateTime(2026, 8, 30, 10, 0, 0, 0, DateTimeKind.Unspecified),
|
CreatedAt = new DateTime(2026, 8, 30, 10, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
CreatedByUserId = new Guid("29000000-0000-0000-0000-000000000003"),
|
||||||
FK_SaleId = new Guid("32000000-0000-0000-0000-000000000002"),
|
FK_SaleId = new Guid("32000000-0000-0000-0000-000000000002"),
|
||||||
FK_StoreId = new Guid("26000000-0000-0000-0000-000000000005"),
|
FK_StoreId = new Guid("26000000-0000-0000-0000-000000000005"),
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
@@ -829,16 +897,17 @@ namespace Distribution.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("Distribution.Models.OrderItem", b =>
|
modelBuilder.Entity("Distribution.Models.OrderItem", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("FK_OrderId")
|
b.Property<Guid>("Id")
|
||||||
.HasColumnType("char(36)");
|
.ValueGeneratedOnAdd()
|
||||||
|
|
||||||
b.Property<Guid>("FK_ItemId")
|
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
b.Property<DateTime>("CreatedAt")
|
||||||
.HasColumnType("datetime(6)");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("FK_ItemId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<Guid>("FK_OrderId")
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
b.Property<bool>("IsActive")
|
b.Property<bool>("IsActive")
|
||||||
@@ -853,19 +922,21 @@ namespace Distribution.Migrations
|
|||||||
b.Property<decimal>("UnitPrice")
|
b.Property<decimal>("UnitPrice")
|
||||||
.HasColumnType("decimal(65,30)");
|
.HasColumnType("decimal(65,30)");
|
||||||
|
|
||||||
b.HasKey("FK_OrderId", "FK_ItemId");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("FK_ItemId");
|
b.HasIndex("FK_ItemId");
|
||||||
|
|
||||||
|
b.HasIndex("FK_OrderId");
|
||||||
|
|
||||||
b.ToTable("OrderItems");
|
b.ToTable("OrderItems");
|
||||||
|
|
||||||
b.HasData(
|
b.HasData(
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
FK_OrderId = new Guid("33000000-0000-0000-0000-000000000001"),
|
|
||||||
FK_ItemId = new Guid("23000000-0000-0000-0000-000000000001"),
|
|
||||||
CreatedAt = new DateTime(2026, 8, 25, 9, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Id = new Guid("34000000-0000-0000-0000-000000000001"),
|
Id = new Guid("34000000-0000-0000-0000-000000000001"),
|
||||||
|
CreatedAt = new DateTime(2026, 8, 25, 9, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
FK_ItemId = new Guid("23000000-0000-0000-0000-000000000001"),
|
||||||
|
FK_OrderId = new Guid("33000000-0000-0000-0000-000000000001"),
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
Quantity = 30,
|
Quantity = 30,
|
||||||
QuantityFulfilled = 30,
|
QuantityFulfilled = 30,
|
||||||
@@ -873,10 +944,10 @@ namespace Distribution.Migrations
|
|||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
FK_OrderId = new Guid("33000000-0000-0000-0000-000000000001"),
|
|
||||||
FK_ItemId = new Guid("23000000-0000-0000-0000-000000000003"),
|
|
||||||
CreatedAt = new DateTime(2026, 8, 25, 9, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Id = new Guid("34000000-0000-0000-0000-000000000002"),
|
Id = new Guid("34000000-0000-0000-0000-000000000002"),
|
||||||
|
CreatedAt = new DateTime(2026, 8, 25, 9, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
FK_ItemId = new Guid("23000000-0000-0000-0000-000000000003"),
|
||||||
|
FK_OrderId = new Guid("33000000-0000-0000-0000-000000000001"),
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
Quantity = 24,
|
Quantity = 24,
|
||||||
QuantityFulfilled = 24,
|
QuantityFulfilled = 24,
|
||||||
@@ -884,10 +955,10 @@ namespace Distribution.Migrations
|
|||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
FK_OrderId = new Guid("33000000-0000-0000-0000-000000000002"),
|
|
||||||
FK_ItemId = new Guid("23000000-0000-0000-0000-000000000002"),
|
|
||||||
CreatedAt = new DateTime(2026, 8, 30, 10, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
Id = new Guid("34000000-0000-0000-0000-000000000003"),
|
Id = new Guid("34000000-0000-0000-0000-000000000003"),
|
||||||
|
CreatedAt = new DateTime(2026, 8, 30, 10, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
FK_ItemId = new Guid("23000000-0000-0000-0000-000000000002"),
|
||||||
|
FK_OrderId = new Guid("33000000-0000-0000-0000-000000000002"),
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
Quantity = 10,
|
Quantity = 10,
|
||||||
QuantityFulfilled = 0,
|
QuantityFulfilled = 0,
|
||||||
@@ -3300,6 +3371,39 @@ namespace Distribution.Migrations
|
|||||||
b.Navigation("PurchaseOrderItem");
|
b.Navigation("PurchaseOrderItem");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Distribution.Models.Invoice", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Distribution.Models.User", "CreatedByUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("CreatedByUserId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Distribution.Models.Order", "Order")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("FK_OrderId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Distribution.Models.User", "FinalizedByUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("FinalizedByUserId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.HasOne("Distribution.Models.User", "PrintedByUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PrintedByUserId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.Navigation("CreatedByUser");
|
||||||
|
|
||||||
|
b.Navigation("FinalizedByUser");
|
||||||
|
|
||||||
|
b.Navigation("Order");
|
||||||
|
|
||||||
|
b.Navigation("PrintedByUser");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Distribution.Models.Item", b =>
|
modelBuilder.Entity("Distribution.Models.Item", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Distribution.Models.Uom", "BaseUom")
|
b.HasOne("Distribution.Models.Uom", "BaseUom")
|
||||||
@@ -3371,11 +3475,21 @@ namespace Distribution.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("Distribution.Models.Order", b =>
|
modelBuilder.Entity("Distribution.Models.Order", b =>
|
||||||
{
|
{
|
||||||
|
b.HasOne("Distribution.Models.User", "ConfirmedByUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ConfirmedByUserId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.HasOne("Distribution.Models.User", "CreatedByUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("CreatedByUserId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("Distribution.Models.Sale", "Sale")
|
b.HasOne("Distribution.Models.Sale", "Sale")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("FK_SaleId")
|
.HasForeignKey("FK_SaleId")
|
||||||
.OnDelete(DeleteBehavior.Restrict)
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("Distribution.Models.Store", "Store")
|
b.HasOne("Distribution.Models.Store", "Store")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
@@ -3383,6 +3497,10 @@ namespace Distribution.Migrations
|
|||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("ConfirmedByUser");
|
||||||
|
|
||||||
|
b.Navigation("CreatedByUser");
|
||||||
|
|
||||||
b.Navigation("Sale");
|
b.Navigation("Sale");
|
||||||
|
|
||||||
b.Navigation("Store");
|
b.Navigation("Store");
|
||||||
|
|||||||
Reference in New Issue
Block a user