//
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("20230519051342_AllTbls")]
partial class AllTbls
{
///
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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property("DateModified")
.HasColumnType("timestamp with time zone");
b.Property("EK")
.HasColumnType("text");
b.Property("HostName")
.IsRequired()
.HasColumnType("text");
b.Property("IP")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Hosts");
});
modelBuilder.Entity("PARR.DAL.Models.Job", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property("DateModified")
.HasColumnType("timestamp with time zone");
b.Property("JobCategoryId")
.HasColumnType("uuid");
b.Property("JobModeId")
.HasColumnType("uuid");
b.Property("JobTypeId")
.HasColumnType("uuid");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property("DateModified")
.HasColumnType("timestamp with time zone");
b.Property("Description")
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("JobCategories");
});
modelBuilder.Entity("PARR.DAL.Models.JobJournal", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property("DateModified")
.HasColumnType("timestamp with time zone");
b.Property("DateOper")
.HasColumnType("text");
b.Property("HostId")
.HasColumnType("uuid");
b.Property("Info")
.HasColumnType("text");
b.Property("JobId")
.HasColumnType("uuid");
b.Property("JobStatusId")
.HasColumnType("uuid");
b.Property("Other")
.HasColumnType("text");
b.Property("TimeOut")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("HostId");
b.HasIndex("JobId");
b.HasIndex("JobStatusId");
b.ToTable("JobJournals");
});
modelBuilder.Entity("PARR.DAL.Models.JobModeService", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property("DateModified")
.HasColumnType("timestamp with time zone");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("JobModes");
});
modelBuilder.Entity("PARR.DAL.Models.JobStatus", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property("DateModified")
.HasColumnType("timestamp with time zone");
b.Property("Description")
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("JobStatuses");
});
modelBuilder.Entity("PARR.DAL.Models.JobType", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property("DateModified")
.HasColumnType("timestamp with time zone");
b.Property("Description")
.HasColumnType("text");
b.Property("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.JobModeService", "JobModeService")
.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("JobModeService");
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.JobModeService", 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
}
}
}