// using System; using AliasClientDb; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace AliasClientDb.Migrations { [DbContext(typeof(AliasClientDbContext))] partial class AliasClientDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.2") .HasAnnotation("Proxies:ChangeTracking", false) .HasAnnotation("Proxies:CheckEquality", false) .HasAnnotation("Proxies:LazyLoading", true); modelBuilder.Entity("AliasClientDb.Alias", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("BirthDate") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("Email") .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("FirstName") .HasMaxLength(255) .HasColumnType("VARCHAR"); b.Property("Gender") .HasMaxLength(255) .HasColumnType("VARCHAR"); b.Property("IsDeleted") .HasColumnType("INTEGER"); b.Property("LastName") .HasMaxLength(255) .HasColumnType("VARCHAR"); b.Property("NickName") .HasMaxLength(255) .HasColumnType("VARCHAR"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Aliases"); }); modelBuilder.Entity("AliasClientDb.Attachment", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("Blob") .IsRequired() .HasColumnType("BLOB"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("CredentialId") .HasColumnType("TEXT"); b.Property("Filename") .IsRequired() .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("IsDeleted") .HasColumnType("INTEGER"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("CredentialId"); b.ToTable("Attachments"); }); modelBuilder.Entity("AliasClientDb.Credential", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("AliasId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("IsDeleted") .HasColumnType("INTEGER"); b.Property("Notes") .HasColumnType("TEXT"); b.Property("ServiceId") .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.Property("Username") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("AliasId"); b.HasIndex("ServiceId"); b.ToTable("Credentials"); }); modelBuilder.Entity("AliasClientDb.EncryptionKey", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("IsDeleted") .HasColumnType("INTEGER"); b.Property("IsPrimary") .HasColumnType("INTEGER"); b.Property("PrivateKey") .IsRequired() .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("PublicKey") .IsRequired() .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("EncryptionKeys"); }); modelBuilder.Entity("AliasClientDb.Password", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("CredentialId") .HasColumnType("TEXT"); b.Property("IsDeleted") .HasColumnType("INTEGER"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.Property("Value") .HasMaxLength(255) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("CredentialId"); b.ToTable("Passwords"); }); modelBuilder.Entity("AliasClientDb.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("IsDeleted") .HasColumnType("INTEGER"); b.Property("Logo") .HasColumnType("BLOB"); b.Property("Name") .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.Property("Url") .HasMaxLength(255) .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Services"); }); modelBuilder.Entity("AliasClientDb.Setting", b => { b.Property("Key") .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("IsDeleted") .HasColumnType("INTEGER"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("Key"); b.ToTable("Settings"); }); modelBuilder.Entity("AliasClientDb.TotpCode", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("CredentialId") .HasColumnType("TEXT"); b.Property("IsDeleted") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("SecretKey") .IsRequired() .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("CredentialId"); b.ToTable("TotpCodes"); }); modelBuilder.Entity("AliasClientDb.Attachment", b => { b.HasOne("AliasClientDb.Credential", "Credential") .WithMany("Attachments") .HasForeignKey("CredentialId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Credential"); }); modelBuilder.Entity("AliasClientDb.Credential", b => { b.HasOne("AliasClientDb.Alias", "Alias") .WithMany("Credentials") .HasForeignKey("AliasId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AliasClientDb.Service", "Service") .WithMany("Credentials") .HasForeignKey("ServiceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Alias"); b.Navigation("Service"); }); modelBuilder.Entity("AliasClientDb.Password", b => { b.HasOne("AliasClientDb.Credential", "Credential") .WithMany("Passwords") .HasForeignKey("CredentialId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Credential"); }); modelBuilder.Entity("AliasClientDb.TotpCode", b => { b.HasOne("AliasClientDb.Credential", "Credential") .WithMany("TotpCodes") .HasForeignKey("CredentialId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Credential"); }); modelBuilder.Entity("AliasClientDb.Alias", b => { b.Navigation("Credentials"); }); modelBuilder.Entity("AliasClientDb.Credential", b => { b.Navigation("Attachments"); b.Navigation("Passwords"); b.Navigation("TotpCodes"); }); modelBuilder.Entity("AliasClientDb.Service", b => { b.Navigation("Credentials"); }); #pragma warning restore 612, 618 } } }