//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RMuseum.DbContext;
namespace RMuseum.Migrations
{
[DbContext(typeof(RMuseumDbContext))]
[Migration("20200325142334_AuditLogs")]
partial class AuditLogs
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.2")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property("ClaimType")
.HasColumnType("nvarchar(max)");
b.Property("ClaimValue")
.HasColumnType("nvarchar(max)");
b.Property("RoleId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property("ClaimType")
.HasColumnType("nvarchar(max)");
b.Property("ClaimValue")
.HasColumnType("nvarchar(max)");
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
{
b.Property("LoginProvider")
.HasColumnType("nvarchar(450)");
b.Property("ProviderKey")
.HasColumnType("nvarchar(450)");
b.Property("ProviderDisplayName")
.HasColumnType("nvarchar(max)");
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
{
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.Property("RoleId")
.HasColumnType("uniqueidentifier");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
{
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.Property("LoginProvider")
.HasColumnType("nvarchar(450)");
b.Property("Name")
.HasColumnType("nvarchar(450)");
b.Property("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RArtifactItemRecord", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CoverImageIndex")
.HasColumnType("int");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("DescriptionInEnglish")
.HasColumnType("nvarchar(max)");
b.Property("FriendlyUrl")
.HasColumnType("nvarchar(450)");
b.Property("LastModified")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("NameInEnglish")
.HasColumnType("nvarchar(max)");
b.Property("Order")
.HasColumnType("int");
b.Property("RArtifactMasterRecordId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("RArtifactMasterRecordId", "FriendlyUrl")
.IsUnique()
.HasFilter("[FriendlyUrl] IS NOT NULL");
b.HasIndex("RArtifactMasterRecordId", "Order")
.IsUnique();
b.ToTable("Items");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RArtifactMasterRecord", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CoverImageId")
.HasColumnType("uniqueidentifier");
b.Property("CoverItemIndex")
.HasColumnType("int");
b.Property("DateTime")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("DescriptionInEnglish")
.HasColumnType("nvarchar(max)");
b.Property("FriendlyUrl")
.HasColumnType("nvarchar(450)");
b.Property("ItemCount")
.HasColumnType("int");
b.Property("LastModified")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("NameInEnglish")
.HasColumnType("nvarchar(max)");
b.Property("Status")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CoverImageId");
b.HasIndex("FriendlyUrl")
.IsUnique()
.HasFilter("[FriendlyUrl] IS NOT NULL");
b.ToTable("Artifacts");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RTag", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("FriendlyUrl")
.HasColumnType("nvarchar(450)");
b.Property("GlobalValue")
.HasColumnType("bit");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("NameInEnglish")
.HasColumnType("nvarchar(max)");
b.Property("Order")
.HasColumnType("int");
b.Property("PluralName")
.HasColumnType("nvarchar(max)");
b.Property("PluralNameInEnglish")
.HasColumnType("nvarchar(max)");
b.Property("Status")
.HasColumnType("int");
b.Property("TagType")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("FriendlyUrl");
b.ToTable("Tags");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RTagValue", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("FriendlyUrl")
.HasColumnType("nvarchar(450)");
b.Property("Order")
.HasColumnType("int");
b.Property("RArtifactItemRecordId")
.HasColumnType("uniqueidentifier");
b.Property("RArtifactMasterRecordId")
.HasColumnType("uniqueidentifier");
b.Property("RTagId")
.HasColumnType("uniqueidentifier");
b.Property("Status")
.HasColumnType("int");
b.Property("Value")
.HasColumnType("nvarchar(max)");
b.Property("ValueInEnglish")
.HasColumnType("nvarchar(max)");
b.Property("ValueSupplement")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("FriendlyUrl");
b.HasIndex("RArtifactItemRecordId");
b.HasIndex("RArtifactMasterRecordId");
b.HasIndex("RTagId");
b.ToTable("TagValues");
});
modelBuilder.Entity("RMuseum.Models.Bookmark.RUserBookmark", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("DateTime")
.HasColumnType("datetime2");
b.Property("Note")
.HasColumnType("nvarchar(max)");
b.Property("RAppUserId")
.HasColumnType("uniqueidentifier");
b.Property("RArtifactItemRecordId")
.HasColumnType("uniqueidentifier");
b.Property("RArtifactMasterRecordId")
.HasColumnType("uniqueidentifier");
b.Property("RBookmarkType")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("RAppUserId");
b.HasIndex("RArtifactItemRecordId");
b.HasIndex("RArtifactMasterRecordId");
b.ToTable("UserBookmarks");
});
modelBuilder.Entity("RMuseum.Models.GanjoorIntegration.GanjoorLink", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ArtifactId")
.HasColumnType("uniqueidentifier");
b.Property("GanjoorPostId")
.HasColumnType("int");
b.Property("GanjoorTitle")
.HasColumnType("nvarchar(max)");
b.Property("GanjoorUrl")
.HasColumnType("nvarchar(max)");
b.Property("ItemId")
.HasColumnType("uniqueidentifier");
b.Property("ReviewDate")
.HasColumnType("datetime2");
b.Property("ReviewResult")
.HasColumnType("int");
b.Property("ReviewerId")
.HasColumnType("uniqueidentifier");
b.Property("SuggestedById")
.HasColumnType("uniqueidentifier");
b.Property("SuggestionDate")
.HasColumnType("datetime2");
b.Property("Synchronized")
.HasColumnType("bit");
b.HasKey("Id");
b.HasIndex("ArtifactId");
b.HasIndex("ItemId");
b.HasIndex("ReviewerId");
b.HasIndex("SuggestedById");
b.ToTable("GanjoorLinks");
});
modelBuilder.Entity("RMuseum.Models.ImportJob.ImportJob", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ArtifactId")
.HasColumnType("uniqueidentifier");
b.Property("EndTime")
.HasColumnType("datetime2");
b.Property("Exception")
.HasColumnType("nvarchar(max)");
b.Property("FriendlyUrl")
.HasColumnType("nvarchar(max)");
b.Property("JobType")
.HasColumnType("int");
b.Property("ProgressPercent")
.HasColumnType("decimal(18,2)");
b.Property("QueueTime")
.HasColumnType("datetime2");
b.Property("ResourceNumber")
.HasColumnType("nvarchar(max)");
b.Property("SrcContent")
.HasColumnType("nvarchar(max)");
b.Property("SrcUrl")
.HasColumnType("nvarchar(max)");
b.Property("StartTime")
.HasColumnType("datetime2");
b.Property("Status")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ArtifactId");
b.ToTable("ImportJobs");
});
modelBuilder.Entity("RMuseum.Models.Note.RUserNote", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("DateTime")
.HasColumnType("datetime2");
b.Property("HtmlContent")
.HasColumnType("nvarchar(max)");
b.Property("LastModified")
.HasColumnType("datetime2");
b.Property("Modified")
.HasColumnType("bit");
b.Property("NoteType")
.HasColumnType("int");
b.Property("RAppUserId")
.HasColumnType("uniqueidentifier");
b.Property("RArtifactItemRecordId")
.HasColumnType("uniqueidentifier");
b.Property("RArtifactMasterRecordId")
.HasColumnType("uniqueidentifier");
b.Property("ReferenceNoteId")
.HasColumnType("uniqueidentifier");
b.Property("Status")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("RAppUserId");
b.HasIndex("RArtifactItemRecordId");
b.HasIndex("RArtifactMasterRecordId");
b.HasIndex("ReferenceNoteId");
b.ToTable("UserNotes");
});
modelBuilder.Entity("RMuseum.Models.Notification.RUserNotification", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("DateTime")
.HasColumnType("datetime2");
b.Property("HtmlText")
.HasColumnType("nvarchar(max)");
b.Property("Status")
.HasColumnType("int");
b.Property("Subject")
.HasColumnType("nvarchar(max)");
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("Notifications");
});
modelBuilder.Entity("RSecurityBackend.Models.Audit.Db.REvent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Duration")
.HasColumnType("int");
b.Property("EndDate")
.HasColumnType("datetime2");
b.Property("EventType")
.HasColumnType("nvarchar(max)");
b.Property("IpAddress")
.HasColumnType("nvarchar(max)");
b.Property("JsonData")
.HasColumnType("nvarchar(max)");
b.Property("RequestUrl")
.HasColumnType("nvarchar(max)");
b.Property("ResponseStatusCode")
.HasColumnType("int");
b.Property("StartDate")
.HasColumnType("datetime2");
b.Property("UserName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("AuditLogs");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RAppRole", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("Name")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property("NormalizedName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RAppUser", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("AccessFailedCount")
.HasColumnType("int");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property("CreateDate")
.HasColumnType("datetime2");
b.Property("Email")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property("EmailConfirmed")
.HasColumnType("bit");
b.Property("FirstName")
.HasColumnType("nvarchar(max)");
b.Property("LockoutEnabled")
.HasColumnType("bit");
b.Property("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property("NormalizedEmail")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property("NormalizedUserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property("PasswordHash")
.HasColumnType("nvarchar(max)");
b.Property("PhoneNumber")
.HasColumnType("nvarchar(max)");
b.Property("PhoneNumberConfirmed")
.HasColumnType("bit");
b.Property("RImageId")
.HasColumnType("uniqueidentifier");
b.Property("SecurityStamp")
.HasColumnType("nvarchar(max)");
b.Property("Status")
.HasColumnType("int");
b.Property("SureName")
.HasColumnType("nvarchar(max)");
b.Property("TwoFactorEnabled")
.HasColumnType("bit");
b.Property("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasName("UserNameIndex")
.HasFilter("[NormalizedUserName] IS NOT NULL");
b.HasIndex("RImageId");
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RCaptchaImage", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("DateTime")
.HasColumnType("datetime2");
b.Property("RImageId")
.HasColumnType("uniqueidentifier");
b.Property("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("RImageId");
b.ToTable("CaptchaImages");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RPermission", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("OperationShortName")
.HasColumnType("nvarchar(max)");
b.Property("RAppRoleId")
.HasColumnType("uniqueidentifier");
b.Property("SecurableItemShortName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("RAppRoleId");
b.ToTable("Permissions");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RTemporaryUserSession", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ClientAppName")
.HasColumnType("nvarchar(max)");
b.Property("ClientIPAddress")
.HasColumnType("nvarchar(max)");
b.Property("Language")
.HasColumnType("nvarchar(max)");
b.Property("LastRenewal")
.HasColumnType("datetime2");
b.Property("LoginTime")
.HasColumnType("datetime2");
b.Property("RAppUserId")
.HasColumnType("uniqueidentifier");
b.Property("Token")
.HasColumnType("nvarchar(max)");
b.Property("ValidUntil")
.HasColumnType("datetime2");
b.HasKey("Id");
b.HasIndex("RAppUserId");
b.ToTable("Sessions");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RVerifyQueueItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ClientAppName")
.HasColumnType("nvarchar(max)");
b.Property("ClientIPAddress")
.HasColumnType("nvarchar(max)");
b.Property("DateTime")
.HasColumnType("datetime2");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("Language")
.HasColumnType("nvarchar(max)");
b.Property("PhoneNumber")
.HasColumnType("nvarchar(max)");
b.Property("QueueType")
.HasColumnType("int");
b.Property("Secret")
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("Secret")
.IsUnique()
.HasFilter("[Secret] IS NOT NULL");
b.ToTable("VerifyQueueItems");
});
modelBuilder.Entity("RSecurityBackend.Models.Image.RImage", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ContentType")
.HasColumnType("nvarchar(max)");
b.Property("DataTime")
.HasColumnType("datetime2");
b.Property("Discriminator")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("FileSizeInBytes")
.HasColumnType("bigint");
b.Property("FolderName")
.HasColumnType("nvarchar(max)");
b.Property("ImageHeight")
.HasColumnType("int");
b.Property("ImageWidth")
.HasColumnType("int");
b.Property("LastModified")
.HasColumnType("datetime2");
b.Property("OriginalFileName")
.HasColumnType("nvarchar(max)");
b.Property("StoredFileName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("GeneralImages");
b.HasDiscriminator("Discriminator").HasValue("RImage");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RPictureFile", b =>
{
b.HasBaseType("RSecurityBackend.Models.Image.RImage");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("DescriptionInEnglish")
.HasColumnType("nvarchar(max)");
b.Property("LastModifiedMeta")
.HasColumnType("datetime2");
b.Property("NormalSizeImageHeight")
.HasColumnType("int");
b.Property("NormalSizeImageStoredFileName")
.HasColumnType("nvarchar(max)");
b.Property("NormalSizeImageWidth")
.HasColumnType("int");
b.Property("Order")
.HasColumnType("int");
b.Property("RArtifactItemRecordId")
.HasColumnType("uniqueidentifier");
b.Property("SrcUrl")
.HasColumnType("nvarchar(max)");
b.Property("Status")
.HasColumnType("int");
b.Property("ThumbnailImageHeight")
.HasColumnType("int");
b.Property("ThumbnailImageStoredFileName")
.HasColumnType("nvarchar(max)");
b.Property("ThumbnailImageWidth")
.HasColumnType("int");
b.Property("Title")
.HasColumnType("nvarchar(max)");
b.Property("TitleInEnglish")
.HasColumnType("nvarchar(max)");
b.HasIndex("RArtifactItemRecordId");
b.HasDiscriminator().HasValue("RPictureFile");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("RMuseum.Models.Artifact.RArtifactItemRecord", b =>
{
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", null)
.WithMany("Items")
.HasForeignKey("RArtifactMasterRecordId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("RMuseum.Models.Artifact.RArtifactMasterRecord", b =>
{
b.HasOne("RMuseum.Models.Artifact.RPictureFile", "CoverImage")
.WithMany()
.HasForeignKey("CoverImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("RMuseum.Models.Artifact.RTagValue", b =>
{
b.HasOne("RMuseum.Models.Artifact.RArtifactItemRecord", null)
.WithMany("Tags")
.HasForeignKey("RArtifactItemRecordId");
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", null)
.WithMany("Tags")
.HasForeignKey("RArtifactMasterRecordId");
b.HasOne("RMuseum.Models.Artifact.RTag", "RTag")
.WithMany()
.HasForeignKey("RTagId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("RMuseum.Models.Bookmark.RUserBookmark", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "RAppUser")
.WithMany()
.HasForeignKey("RAppUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RMuseum.Models.Artifact.RArtifactItemRecord", "RArtifactItemRecord")
.WithMany()
.HasForeignKey("RArtifactItemRecordId");
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", "RArtifactMasterRecord")
.WithMany()
.HasForeignKey("RArtifactMasterRecordId");
});
modelBuilder.Entity("RMuseum.Models.GanjoorIntegration.GanjoorLink", b =>
{
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", "Artifact")
.WithMany()
.HasForeignKey("ArtifactId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RMuseum.Models.Artifact.RArtifactItemRecord", "Item")
.WithMany()
.HasForeignKey("ItemId");
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "Reviewer")
.WithMany()
.HasForeignKey("ReviewerId");
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "SuggestedBy")
.WithMany()
.HasForeignKey("SuggestedById")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("RMuseum.Models.ImportJob.ImportJob", b =>
{
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", "Artifact")
.WithMany()
.HasForeignKey("ArtifactId");
});
modelBuilder.Entity("RMuseum.Models.Note.RUserNote", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "RAppUser")
.WithMany()
.HasForeignKey("RAppUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RMuseum.Models.Artifact.RArtifactItemRecord", "RArtifactItemRecord")
.WithMany()
.HasForeignKey("RArtifactItemRecordId");
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", "RArtifactMasterRecord")
.WithMany()
.HasForeignKey("RArtifactMasterRecordId");
b.HasOne("RMuseum.Models.Note.RUserNote", "ReferenceNote")
.WithMany()
.HasForeignKey("ReferenceNoteId");
});
modelBuilder.Entity("RMuseum.Models.Notification.RUserNotification", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RAppUser", b =>
{
b.HasOne("RSecurityBackend.Models.Image.RImage", "RImage")
.WithMany()
.HasForeignKey("RImageId");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RCaptchaImage", b =>
{
b.HasOne("RSecurityBackend.Models.Image.RImage", "RImage")
.WithMany()
.HasForeignKey("RImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RPermission", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppRole", null)
.WithMany("Permissions")
.HasForeignKey("RAppRoleId");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RTemporaryUserSession", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "RAppUser")
.WithMany()
.HasForeignKey("RAppUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("RMuseum.Models.Artifact.RPictureFile", b =>
{
b.HasOne("RMuseum.Models.Artifact.RArtifactItemRecord", null)
.WithMany("Images")
.HasForeignKey("RArtifactItemRecordId");
});
#pragma warning restore 612, 618
}
}
}