Syncer АИХ ИТ

This commit is contained in:
Mikhail Kuznetsov
2023-06-01 12:30:38 +10:00
parent e34037267c
commit 118cd280df
27 changed files with 953 additions and 8 deletions

View File

@@ -0,0 +1,336 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using PARR.DAL.Context;
#nullable disable
namespace PARR.DAL.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20230601014714_UpdTblHosts")]
partial class UpdTblHosts
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("PARR.DAL.Models.Host", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("APP")
.HasColumnType("text");
b.Property<string>("DB")
.HasColumnType("text");
b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<string>("HostName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("IP")
.IsRequired()
.HasColumnType("text");
b.Property<string>("LinkEK")
.HasColumnType("text");
b.Property<string>("OS")
.HasColumnType("text");
b.Property<string>("RegionalEK")
.HasColumnType("text");
b.Property<string>("Responsible")
.HasColumnType("text");
b.Property<string>("Status")
.HasColumnType("text");
b.Property<string>("WorkGroup")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Hosts");
});
modelBuilder.Entity("PARR.DAL.Models.Job", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("JobCategoryId")
.HasColumnType("uuid");
b.Property<Guid>("JobModeId")
.HasColumnType("uuid");
b.Property<Guid>("JobTypeId")
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("JobCategoryId");
b.HasIndex("JobModeId");
b.HasIndex("JobTypeId");
b.ToTable("Jobs");
});
modelBuilder.Entity("PARR.DAL.Models.JobCategory", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("JobCategories");
});
modelBuilder.Entity("PARR.DAL.Models.JobJournal", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<string>("DateOper")
.HasColumnType("text");
b.Property<Guid>("HostId")
.HasColumnType("uuid");
b.Property<string>("Info")
.HasColumnType("text");
b.Property<Guid>("JobId")
.HasColumnType("uuid");
b.Property<Guid>("JobStatusId")
.HasColumnType("uuid");
b.Property<string>("Other")
.HasColumnType("text");
b.Property<int?>("TimeOut")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("HostId");
b.HasIndex("JobId");
b.HasIndex("JobStatusId");
b.ToTable("JobJournals");
});
modelBuilder.Entity("PARR.DAL.Models.JobMode", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("JobModes");
});
modelBuilder.Entity("PARR.DAL.Models.JobStatus", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("JobStatuses");
});
modelBuilder.Entity("PARR.DAL.Models.JobType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("JobTypes");
});
modelBuilder.Entity("PARR.DAL.Models.Job", b =>
{
b.HasOne("PARR.DAL.Models.JobCategory", "JobCategorye")
.WithMany("Jobs")
.HasForeignKey("JobCategoryId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("PARR.DAL.Models.JobMode", "JobMode")
.WithMany("Jobs")
.HasForeignKey("JobModeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("PARR.DAL.Models.JobType", "JobType")
.WithMany("Jobs")
.HasForeignKey("JobTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("JobCategorye");
b.Navigation("JobMode");
b.Navigation("JobType");
});
modelBuilder.Entity("PARR.DAL.Models.JobJournal", b =>
{
b.HasOne("PARR.DAL.Models.Host", "Host")
.WithMany("JobJournals")
.HasForeignKey("HostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("PARR.DAL.Models.Job", "Job")
.WithMany("Journals")
.HasForeignKey("JobId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("PARR.DAL.Models.JobStatus", "Status")
.WithMany("Journals")
.HasForeignKey("JobStatusId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Host");
b.Navigation("Job");
b.Navigation("Status");
});
modelBuilder.Entity("PARR.DAL.Models.Host", b =>
{
b.Navigation("JobJournals");
});
modelBuilder.Entity("PARR.DAL.Models.Job", b =>
{
b.Navigation("Journals");
});
modelBuilder.Entity("PARR.DAL.Models.JobCategory", b =>
{
b.Navigation("Jobs");
});
modelBuilder.Entity("PARR.DAL.Models.JobMode", b =>
{
b.Navigation("Jobs");
});
modelBuilder.Entity("PARR.DAL.Models.JobStatus", b =>
{
b.Navigation("Journals");
});
modelBuilder.Entity("PARR.DAL.Models.JobType", b =>
{
b.Navigation("Jobs");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,98 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class UpdTblHosts : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "EK",
table: "Hosts",
newName: "WorkGroup");
migrationBuilder.AddColumn<string>(
name: "APP",
table: "Hosts",
type: "text",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "DB",
table: "Hosts",
type: "text",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "LinkEK",
table: "Hosts",
type: "text",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "OS",
table: "Hosts",
type: "text",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RegionalEK",
table: "Hosts",
type: "text",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Responsible",
table: "Hosts",
type: "text",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Status",
table: "Hosts",
type: "text",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "APP",
table: "Hosts");
migrationBuilder.DropColumn(
name: "DB",
table: "Hosts");
migrationBuilder.DropColumn(
name: "LinkEK",
table: "Hosts");
migrationBuilder.DropColumn(
name: "OS",
table: "Hosts");
migrationBuilder.DropColumn(
name: "RegionalEK",
table: "Hosts");
migrationBuilder.DropColumn(
name: "Responsible",
table: "Hosts");
migrationBuilder.DropColumn(
name: "Status",
table: "Hosts");
migrationBuilder.RenameColumn(
name: "WorkGroup",
table: "Hosts",
newName: "EK");
}
}
}

View File

@@ -28,15 +28,18 @@ namespace PARR.DAL.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("APP")
.HasColumnType("text");
b.Property<string>("DB")
.HasColumnType("text");
b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<string>("EK")
.HasColumnType("text");
b.Property<string>("HostName")
.IsRequired()
.HasColumnType("text");
@@ -45,6 +48,24 @@ namespace PARR.DAL.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<string>("LinkEK")
.HasColumnType("text");
b.Property<string>("OS")
.HasColumnType("text");
b.Property<string>("RegionalEK")
.HasColumnType("text");
b.Property<string>("Responsible")
.HasColumnType("text");
b.Property<string>("Status")
.HasColumnType("text");
b.Property<string>("WorkGroup")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Hosts");