//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using DiunaBI.Domain.Entities;
using DiunaBI.Infrastructure.Data;
#nullable disable
namespace DiunaBI.Infrastructure.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20231030142419_Record.Value32")]
partial class RecordValue32
{
///
protected void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.12")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("WebAPI.Models.Layer", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreatedAt")
.HasColumnType("datetime2");
b.Property("CreatedById")
.HasColumnType("uniqueidentifier");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("ModifiedAt")
.HasColumnType("datetime2");
b.Property("ModifiedById")
.HasColumnType("uniqueidentifier");
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Number")
.HasColumnType("int");
b.Property("ParentId")
.HasColumnType("uniqueidentifier");
b.Property("Source")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Type")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CreatedById");
b.HasIndex("ModifiedById");
b.HasIndex("ParentId");
b.ToTable("Layers");
});
modelBuilder.Entity("WebAPI.Models.ProcessSource", b =>
{
b.Property("LayerId")
.HasColumnType("uniqueidentifier");
b.Property("SourceId")
.HasColumnType("uniqueidentifier");
b.HasKey("LayerId", "SourceId");
b.HasIndex("SourceId");
b.ToTable("ProcessSources");
});
modelBuilder.Entity("WebAPI.Models.Record", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Code")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CreatedAt")
.HasColumnType("datetime2");
b.Property("CreatedById")
.HasColumnType("uniqueidentifier");
b.Property("Desc1")
.HasColumnType("nvarchar(max)");
b.Property("Desc2")
.HasColumnType("nvarchar(max)");
b.Property("Desc3")
.HasColumnType("nvarchar(max)");
b.Property("Desc4")
.HasColumnType("nvarchar(max)");
b.Property("Desc5")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LayerId")
.HasColumnType("uniqueidentifier");
b.Property("ModifiedAt")
.HasColumnType("datetime2");
b.Property("ModifiedById")
.HasColumnType("uniqueidentifier");
b.Property("Value1")
.HasColumnType("real");
b.Property("Value10")
.HasColumnType("real");
b.Property("Value11")
.HasColumnType("real");
b.Property("Value12")
.HasColumnType("real");
b.Property("Value13")
.HasColumnType("real");
b.Property("Value14")
.HasColumnType("real");
b.Property("Value15")
.HasColumnType("real");
b.Property("Value16")
.HasColumnType("real");
b.Property("Value17")
.HasColumnType("real");
b.Property("Value18")
.HasColumnType("real");
b.Property("Value19")
.HasColumnType("real");
b.Property("Value2")
.HasColumnType("real");
b.Property("Value20")
.HasColumnType("real");
b.Property("Value21")
.HasColumnType("real");
b.Property("Value22")
.HasColumnType("real");
b.Property("Value23")
.HasColumnType("real");
b.Property("Value24")
.HasColumnType("real");
b.Property("Value25")
.HasColumnType("real");
b.Property("Value26")
.HasColumnType("real");
b.Property("Value27")
.HasColumnType("real");
b.Property("Value28")
.HasColumnType("real");
b.Property("Value29")
.HasColumnType("real");
b.Property("Value3")
.HasColumnType("real");
b.Property("Value30")
.HasColumnType("real");
b.Property("Value31")
.HasColumnType("real");
b.Property("Value32")
.HasColumnType("real");
b.Property("Value4")
.HasColumnType("real");
b.Property("Value5")
.HasColumnType("real");
b.Property("Value6")
.HasColumnType("real");
b.Property("Value7")
.HasColumnType("real");
b.Property("Value8")
.HasColumnType("real");
b.Property("Value9")
.HasColumnType("real");
b.HasKey("Id");
b.HasIndex("CreatedById");
b.HasIndex("LayerId");
b.HasIndex("ModifiedById");
b.ToTable("Records");
});
modelBuilder.Entity("WebAPI.Models.User", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreatedAt")
.HasColumnType("datetime2");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("UserName")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("WebAPI.Models.Layer", b =>
{
b.HasOne("WebAPI.Models.User", "CreatedBy")
.WithMany()
.HasForeignKey("CreatedById")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("WebAPI.Models.User", "ModifiedBy")
.WithMany()
.HasForeignKey("ModifiedById")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("WebAPI.Models.Layer", "Parent")
.WithMany()
.HasForeignKey("ParentId");
b.Navigation("CreatedBy");
b.Navigation("ModifiedBy");
b.Navigation("Parent");
});
modelBuilder.Entity("WebAPI.Models.ProcessSource", b =>
{
b.HasOne("WebAPI.Models.Layer", "Source")
.WithMany("Sources")
.HasForeignKey("SourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Source");
});
modelBuilder.Entity("WebAPI.Models.Record", b =>
{
b.HasOne("WebAPI.Models.User", "CreatedBy")
.WithMany()
.HasForeignKey("CreatedById")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("WebAPI.Models.Layer", null)
.WithMany("Records")
.HasForeignKey("LayerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("WebAPI.Models.User", "ModifiedBy")
.WithMany()
.HasForeignKey("ModifiedById")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CreatedBy");
b.Navigation("ModifiedBy");
});
modelBuilder.Entity("WebAPI.Models.Layer", b =>
{
b.Navigation("Records");
b.Navigation("Sources");
});
#pragma warning restore 612, 618
}
}
}