divan/RMuseum/Migrations/20190916070256_DivanLink.Designer.cs
Anas Rashid 532d005cdb Rename Ganjoor -> Divan throughout the code
Projects (GanjooRazor -> DivanRazor, GanjoorService.sln -> DivanService.sln), files,
folders, classes, namespaces, settings, API routes (/api/divan) and DB tables (Divan*).
External addresses (ganjoor.net, github.com/ganjoor) unchanged. Migrations renamed
consistently (no pending model changes); requires a fresh database.
Upstream RUNNING_LOCALLY/SEMANTIC_SEARCH docs archived unmodified under docs/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:49:01 +02:00

824 lines
26 KiB
C#

// <auto-generated />
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("20190916070256_DivanLink")]
partial class DivanLink
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<Guid>("RoleId");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<Guid>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
{
b.Property<string>("LoginProvider");
b.Property<string>("ProviderKey");
b.Property<string>("ProviderDisplayName");
b.Property<Guid>("UserId");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
{
b.Property<Guid>("UserId");
b.Property<Guid>("RoleId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider");
b.Property<string>("Name");
b.Property<string>("Value");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RArtifactItemRecord", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("CoverImageIndex");
b.Property<string>("Description");
b.Property<string>("DescriptionInEnglish");
b.Property<string>("FriendlyUrl");
b.Property<DateTime>("LastModified");
b.Property<string>("Name");
b.Property<string>("NameInEnglish");
b.Property<int>("Order");
b.Property<Guid>("RArtifactMasterRecordId");
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<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("CoverImageId");
b.Property<int>("CoverItemIndex");
b.Property<DateTime>("DateTime");
b.Property<string>("Description");
b.Property<string>("DescriptionInEnglish");
b.Property<string>("FriendlyUrl");
b.Property<int>("ItemCount");
b.Property<DateTime>("LastModified");
b.Property<string>("Name");
b.Property<string>("NameInEnglish");
b.Property<int>("Status");
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<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("FriendlyUrl");
b.Property<bool>("GlobalValue");
b.Property<string>("Name");
b.Property<string>("NameInEnglish");
b.Property<int>("Order");
b.Property<string>("PluralName");
b.Property<string>("PluralNameInEnglish");
b.Property<int>("Status");
b.Property<int>("TagType");
b.HasKey("Id");
b.HasIndex("FriendlyUrl");
b.ToTable("Tags");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RTagValue", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("FriendlyUrl");
b.Property<int>("Order");
b.Property<Guid?>("RArtifactItemRecordId");
b.Property<Guid?>("RArtifactMasterRecordId");
b.Property<Guid>("RTagId");
b.Property<int>("Status");
b.Property<string>("Value");
b.Property<string>("ValueInEnglish");
b.Property<string>("ValueSupplement");
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<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("DateTime");
b.Property<string>("Note");
b.Property<Guid>("RAppUserId");
b.Property<Guid?>("RArtifactItemRecordId");
b.Property<Guid?>("RArtifactMasterRecordId");
b.Property<int>("RBookmarkType");
b.HasKey("Id");
b.HasIndex("RAppUserId");
b.HasIndex("RArtifactItemRecordId");
b.HasIndex("RArtifactMasterRecordId");
b.ToTable("UserBookmarks");
});
modelBuilder.Entity("RMuseum.Models.DivanIntegration.DivanLink", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ArtifactId");
b.Property<int>("DivanPostId");
b.Property<string>("DivanTitle");
b.Property<string>("DivanUrl");
b.Property<Guid?>("ItemId");
b.Property<DateTime>("ReviewDate");
b.Property<int>("ReviewResult");
b.Property<Guid?>("ReviewerId");
b.Property<Guid>("SuggestedById");
b.Property<DateTime>("SuggestionDate");
b.Property<bool>("Synchronized");
b.HasKey("Id");
b.HasIndex("ArtifactId");
b.HasIndex("ItemId");
b.HasIndex("ReviewerId");
b.HasIndex("SuggestedById");
b.ToTable("DivanLinks");
});
modelBuilder.Entity("RMuseum.Models.ImportJob.ImportJob", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid?>("ArtifactId");
b.Property<DateTime>("EndTime");
b.Property<string>("Exception");
b.Property<string>("FriendlyUrl");
b.Property<int>("JobType");
b.Property<decimal>("ProgressPercent");
b.Property<DateTime>("QueueTime");
b.Property<string>("ResourceNumber");
b.Property<string>("SrcContent");
b.Property<string>("SrcUrl");
b.Property<DateTime>("StartTime");
b.Property<int>("Status");
b.HasKey("Id");
b.HasIndex("ArtifactId");
b.ToTable("ImportJobs");
});
modelBuilder.Entity("RMuseum.Models.Note.RUserNote", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("DateTime");
b.Property<string>("HtmlContent");
b.Property<DateTime>("LastModified");
b.Property<bool>("Modified");
b.Property<int>("NoteType");
b.Property<Guid>("RAppUserId");
b.Property<Guid?>("RArtifactItemRecordId");
b.Property<Guid?>("RArtifactMasterRecordId");
b.Property<Guid?>("ReferenceNoteId");
b.Property<int>("Status");
b.HasKey("Id");
b.HasIndex("RAppUserId");
b.HasIndex("RArtifactItemRecordId");
b.HasIndex("RArtifactMasterRecordId");
b.HasIndex("ReferenceNoteId");
b.ToTable("UserNotes");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RAppRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Description");
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.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<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AccessFailedCount");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<DateTime>("CreateDate");
b.Property<string>("Email")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed");
b.Property<string>("FirstName");
b.Property<bool>("LockoutEnabled");
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.HasMaxLength(256);
b.Property<string>("PasswordHash");
b.Property<string>("PhoneNumber");
b.Property<bool>("PhoneNumberConfirmed");
b.Property<Guid?>("RImageId");
b.Property<string>("SecurityStamp");
b.Property<int>("Status");
b.Property<string>("SureName");
b.Property<bool>("TwoFactorEnabled");
b.Property<string>("UserName")
.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<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("DateTime");
b.Property<Guid>("RImageId");
b.Property<string>("Value");
b.HasKey("Id");
b.HasIndex("RImageId");
b.ToTable("CaptchaImages");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RPermission", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("OperationShortName");
b.Property<Guid?>("RAppRoleId");
b.Property<string>("SecurableItemShortName");
b.HasKey("Id");
b.HasIndex("RAppRoleId");
b.ToTable("Permissions");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RTemporaryUserSession", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClientAppName");
b.Property<string>("ClientIPAddress");
b.Property<string>("Language");
b.Property<DateTime>("LastRenewal");
b.Property<DateTime>("LoginTime");
b.Property<Guid>("RAppUserId");
b.Property<string>("Token");
b.Property<DateTime>("ValidUntil");
b.HasKey("Id");
b.HasIndex("RAppUserId");
b.ToTable("Sessions");
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RVerifyQueueItem", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClientAppName");
b.Property<string>("ClientIPAddress");
b.Property<DateTime>("DateTime");
b.Property<string>("Email");
b.Property<string>("Language");
b.Property<string>("PhoneNumber");
b.Property<int>("QueueType");
b.Property<string>("Secret");
b.HasKey("Id");
b.HasIndex("Secret")
.IsUnique()
.HasFilter("[Secret] IS NOT NULL");
b.ToTable("VerifyQueueItems");
});
modelBuilder.Entity("RSecurityBackend.Models.Image.RImage", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ContentType");
b.Property<DateTime>("DataTime");
b.Property<string>("Discriminator")
.IsRequired();
b.Property<long>("FileSizeInBytes");
b.Property<string>("FolderName");
b.Property<int>("ImageHeight");
b.Property<int>("ImageWidth");
b.Property<DateTime>("LastModified");
b.Property<string>("OriginalFileName");
b.Property<string>("StoredFileName");
b.HasKey("Id");
b.ToTable("GeneralImages");
b.HasDiscriminator<string>("Discriminator").HasValue("RImage");
});
modelBuilder.Entity("RMuseum.Models.Artifact.RPictureFile", b =>
{
b.HasBaseType("RSecurityBackend.Models.Image.RImage");
b.Property<string>("Description");
b.Property<string>("DescriptionInEnglish");
b.Property<DateTime>("LastModifiedMeta");
b.Property<int>("NormalSizeImageHeight");
b.Property<string>("NormalSizeImageStoredFileName");
b.Property<int>("NormalSizeImageWidth");
b.Property<int>("Order");
b.Property<Guid?>("RArtifactItemRecordId");
b.Property<string>("SrcUrl");
b.Property<int>("Status");
b.Property<int>("ThumbnailImageHeight");
b.Property<string>("ThumbnailImageStoredFileName");
b.Property<int>("ThumbnailImageWidth");
b.Property<string>("Title");
b.Property<string>("TitleInEnglish");
b.HasIndex("RArtifactItemRecordId");
b.HasDiscriminator().HasValue("RPictureFile");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("RMuseum.Models.Artifact.RArtifactItemRecord", b =>
{
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord")
.WithMany("Items")
.HasForeignKey("RArtifactMasterRecordId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("RMuseum.Models.Artifact.RArtifactMasterRecord", b =>
{
b.HasOne("RMuseum.Models.Artifact.RPictureFile", "CoverImage")
.WithMany()
.HasForeignKey("CoverImageId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("RMuseum.Models.Artifact.RTagValue", b =>
{
b.HasOne("RMuseum.Models.Artifact.RArtifactItemRecord")
.WithMany("Tags")
.HasForeignKey("RArtifactItemRecordId");
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord")
.WithMany("Tags")
.HasForeignKey("RArtifactMasterRecordId");
b.HasOne("RMuseum.Models.Artifact.RTag", "RTag")
.WithMany()
.HasForeignKey("RTagId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("RMuseum.Models.Bookmark.RUserBookmark", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppUser", "RAppUser")
.WithMany()
.HasForeignKey("RAppUserId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("RMuseum.Models.Artifact.RArtifactItemRecord", "RArtifactItemRecord")
.WithMany()
.HasForeignKey("RArtifactItemRecordId");
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", "RArtifactMasterRecord")
.WithMany()
.HasForeignKey("RArtifactMasterRecordId");
});
modelBuilder.Entity("RMuseum.Models.DivanIntegration.DivanLink", b =>
{
b.HasOne("RMuseum.Models.Artifact.RArtifactMasterRecord", "Artifact")
.WithMany()
.HasForeignKey("ArtifactId")
.OnDelete(DeleteBehavior.Cascade);
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);
});
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);
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("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);
});
modelBuilder.Entity("RSecurityBackend.Models.Auth.Db.RPermission", b =>
{
b.HasOne("RSecurityBackend.Models.Auth.Db.RAppRole")
.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);
});
modelBuilder.Entity("RMuseum.Models.Artifact.RPictureFile", b =>
{
b.HasOne("RMuseum.Models.Artifact.RArtifactItemRecord")
.WithMany("Images")
.HasForeignKey("RArtifactItemRecordId");
});
#pragma warning restore 612, 618
}
}
}