feat(esppOrderLoader): доделал логику синхронизации
This commit is contained in:
2648
PARR.DAL/Migrations/20231024002524_TblOrdersAndAgentHistory.Designer.cs
generated
Normal file
2648
PARR.DAL/Migrations/20231024002524_TblOrdersAndAgentHistory.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class TblOrdersAndAgentHistory : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTimeOffset>(
|
||||
name: "DateModified",
|
||||
table: "Orders",
|
||||
type: "timestamp with time zone",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ShortName",
|
||||
table: "Orders",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "OrderId",
|
||||
table: "AgentHistories",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AgentHistories_OrderId",
|
||||
table: "AgentHistories",
|
||||
column: "OrderId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AgentHistories_Orders_OrderId",
|
||||
table: "AgentHistories",
|
||||
column: "OrderId",
|
||||
principalTable: "Orders",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AgentHistories_Orders_OrderId",
|
||||
table: "AgentHistories");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_AgentHistories_OrderId",
|
||||
table: "AgentHistories");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DateModified",
|
||||
table: "Orders");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShortName",
|
||||
table: "Orders");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OrderId",
|
||||
table: "AgentHistories");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -384,6 +384,9 @@ namespace PARR.DAL.Migrations
|
||||
b.Property<string>("Message")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid?>("OrderId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("TemplateId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
@@ -391,6 +394,8 @@ namespace PARR.DAL.Migrations
|
||||
|
||||
b.HasIndex("HistoryLevelId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("TemplateId");
|
||||
|
||||
b.ToTable("AgentHistories");
|
||||
@@ -1556,6 +1561,9 @@ namespace PARR.DAL.Migrations
|
||||
b.Property<DateTimeOffset>("DateCreated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<DateTimeOffset?>("DateModified")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Number")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
@@ -1563,6 +1571,10 @@ namespace PARR.DAL.Migrations
|
||||
b.Property<int>("OrderStatusCode")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ShortName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid?>("TemplateId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
@@ -2226,6 +2238,10 @@ namespace PARR.DAL.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PARR.DAL.Models.Order", "Order")
|
||||
.WithMany("AgentHistories")
|
||||
.HasForeignKey("OrderId");
|
||||
|
||||
b.HasOne("PARR.DAL.Models.Template", "Template")
|
||||
.WithMany("AgentHistories")
|
||||
.HasForeignKey("TemplateId")
|
||||
@@ -2234,6 +2250,8 @@ namespace PARR.DAL.Migrations
|
||||
|
||||
b.Navigation("AgentHistoryLevel");
|
||||
|
||||
b.Navigation("Order");
|
||||
|
||||
b.Navigation("Template");
|
||||
});
|
||||
|
||||
@@ -2551,6 +2569,11 @@ namespace PARR.DAL.Migrations
|
||||
b.Navigation("Templates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Order", b =>
|
||||
{
|
||||
b.Navigation("AgentHistories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.OrderStatus", b =>
|
||||
{
|
||||
b.Navigation("Orders");
|
||||
|
||||
Reference in New Issue
Block a user