//
using System;
using IRaCIS.Core.Test.CodeFirstTest.MSSQL;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
{
[DbContext(typeof(IRCContext))]
partial class IRCContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Dictionary", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Code")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("ConfigTypeId")
.HasColumnType("uniqueidentifier");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property("ParentId")
.HasColumnType("uniqueidentifier");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ConfigTypeId");
b.HasIndex("ParentId");
b.ToTable("Dictionary");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Project", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("Project");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ProjectUser", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property("ProjectId")
.HasColumnType("uniqueidentifier");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ProjectId");
b.ToTable("ProjectUser");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ReadModule", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ReadModule");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ReadingClinicalData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Code")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property("ReadingId")
.HasColumnType("uniqueidentifier");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ReadingId");
b.ToTable("ReadingClinicalData");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.SubejectVisit", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property("SubjectId")
.HasColumnType("uniqueidentifier");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("SubjectId");
b.ToTable("SubejectVisit");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Subject", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property("FinalSubjectVisitId")
.HasColumnType("uniqueidentifier");
b.Property("LatestSubjectVisitId")
.HasColumnType("uniqueidentifier");
b.Property("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("FinalSubjectVisitId");
b.HasIndex("LatestSubjectVisitId");
b.ToTable("Subject");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestNew", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property("TestName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("TrialImageDownloadId")
.HasColumnType("uniqueidentifier");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("TrialImageDownloadId");
b.ToTable("TestNew");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestStringLength", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property("DefaultLength")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.Property("UserDefineLength")
.IsRequired()
.HasMaxLength(300)
.HasColumnType("nvarchar(300)");
b.Property("UserDefineText")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("TestStringLength");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TrialImageDownload", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property("DownloadEndTime")
.HasColumnType("datetime2");
b.Property("DownloadStartTime")
.HasColumnType("datetime2");
b.Property("ImageCount")
.HasColumnType("int");
b.Property("ImageSize")
.HasColumnType("bigint");
b.Property("ImageType")
.HasColumnType("int");
b.Property("IsSuccess")
.HasColumnType("bit");
b.Property("SubjectVisitId")
.HasColumnType("uniqueidentifier");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("TrialImageDownload");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Dictionary", b =>
{
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Dictionary", "ConfigType")
.WithMany()
.HasForeignKey("ConfigTypeId");
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Dictionary", "Parent")
.WithMany("ChildList")
.HasForeignKey("ParentId");
b.Navigation("ConfigType");
b.Navigation("Parent");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ProjectUser", b =>
{
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Project", "Project")
.WithMany()
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Project");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ReadingClinicalData", b =>
{
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.ReadModule", "ReadModule")
.WithMany()
.HasForeignKey("ReadingId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.SubejectVisit", "SubjectVisit")
.WithMany()
.HasForeignKey("ReadingId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ReadModule");
b.Navigation("SubjectVisit");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.SubejectVisit", b =>
{
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Subject", "Subject")
.WithMany("SubejectVisitList")
.HasForeignKey("SubjectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Subject");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Subject", b =>
{
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.SubejectVisit", "FinalSubjectVisit")
.WithMany()
.HasForeignKey("FinalSubjectVisitId");
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.SubejectVisit", "LatestSubjectVisit")
.WithMany()
.HasForeignKey("LatestSubjectVisitId");
b.Navigation("FinalSubjectVisit");
b.Navigation("LatestSubjectVisit");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestNew", b =>
{
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TrialImageDownload", null)
.WithMany("TestNewList")
.HasForeignKey("TrialImageDownloadId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Dictionary", b =>
{
b.Navigation("ChildList");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.Subject", b =>
{
b.Navigation("SubejectVisitList");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TrialImageDownload", b =>
{
b.Navigation("TestNewList");
});
#pragma warning restore 612, 618
}
}
}