Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
// <auto-generated />
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", "10.0.10")
.HasAnnotation("Proxies:ChangeTracking", false)
.HasAnnotation("Proxies:CheckEquality", false)
.HasAnnotation("Proxies:LazyLoading", true);
modelBuilder.Entity("AliasClientDb.Attachment", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<byte[]>("Blob")
.HasColumnType("BLOB");
b.Property<string>("BlobHash")
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<string>("Filename")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<string>("ItemId")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("ManifestId", "Id");
b.HasIndex("ManifestId", "ItemId");
b.ToTable("Attachments");
});
modelBuilder.Entity("AliasClientDb.CodecOverflow", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("CodecOverflows");
});
modelBuilder.Entity("AliasClientDb.EncryptionKey", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsPrimary")
.HasColumnType("INTEGER");
b.Property<string>("PrivateKey")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property<string>("PublicKey")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("ManifestId", "Id");
b.HasIndex("ManifestId", "IsPrimary");
b.ToTable("EncryptionKeys");
});
modelBuilder.Entity("AliasClientDb.FieldDefinition", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("ApplicableToTypes")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<bool>("EnableHistory")
.HasColumnType("INTEGER");
b.Property<string>("FieldType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsHidden")
.HasColumnType("INTEGER");
b.Property<bool>("IsMultiValue")
.HasColumnType("INTEGER");
b.Property<string>("Label")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.Property<int>("Weight")
.HasColumnType("INTEGER");
b.HasKey("ManifestId", "Id");
b.ToTable("FieldDefinitions");
});
modelBuilder.Entity("AliasClientDb.FieldHistory", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("ChangedAt")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<string>("FieldDefinitionId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("FieldKey")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<string>("ItemId")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.Property<string>("ValueSnapshot")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("ManifestId", "Id");
b.HasIndex("FieldDefinitionId");
b.HasIndex("ItemId");
b.HasIndex("ManifestId", "FieldDefinitionId");
b.HasIndex("ManifestId", "ItemId");
b.ToTable("FieldHistories");
});
modelBuilder.Entity("AliasClientDb.FieldValue", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<string>("FieldDefinitionId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("FieldKey")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsDisabled")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property<string>("ItemId")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.Property<string>("Value")
.HasColumnType("TEXT");
b.Property<int>("ValueIndex")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0);
b.Property<int>("Weight")
.HasColumnType("INTEGER");
b.HasKey("ManifestId", "Id");
b.HasIndex("FieldDefinitionId");
b.HasIndex("FieldKey");
b.HasIndex("ItemId");
b.HasIndex("ItemId", "FieldKey");
b.HasIndex("ManifestId", "FieldDefinitionId");
b.HasIndex("ManifestId", "ItemId");
b.HasIndex("ItemId", "FieldDefinitionId", "Weight");
b.ToTable("FieldValues");
});
modelBuilder.Entity("AliasClientDb.Folder", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<string>("ParentFolderId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.Property<int>("Weight")
.HasColumnType("INTEGER");
b.HasKey("ManifestId", "Id");
b.HasIndex("ParentFolderId");
b.HasIndex("ManifestId", "ParentFolderId");
b.ToTable("Folders");
});
modelBuilder.Entity("AliasClientDb.Item", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime?>("ArchivedAt")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<DateTime?>("DeletedAt")
.HasColumnType("TEXT");
b.Property<string>("FolderId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<string>("ItemType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<string>("LogoId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Name")
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("ManifestId", "Id");
b.HasIndex("ManifestId", "FolderId");
b.HasIndex("ManifestId", "LogoId");
b.ToTable("Items");
});
modelBuilder.Entity("AliasClientDb.ItemStat", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("DeviceId")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasDefaultValue("")
.UseCollation("NOCASE");
b.Property<int>("AutofillCount")
.HasColumnType("INTEGER");
b.Property<int>("CopyCount")
.HasColumnType("INTEGER");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<DateTime?>("LastAutofilledAt")
.HasColumnType("TEXT");
b.Property<DateTime?>("LastCopiedAt")
.HasColumnType("TEXT");
b.Property<DateTime?>("LastPasskeyAuthAt")
.HasColumnType("TEXT");
b.Property<DateTime?>("LastUsedAt")
.HasColumnType("TEXT");
b.Property<int>("PasskeyAuthCount")
.HasColumnType("INTEGER");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.Property<int>("UseCount")
.HasColumnType("INTEGER");
b.HasKey("ManifestId", "Id", "DeviceId");
b.ToTable("ItemStats");
});
modelBuilder.Entity("AliasClientDb.ItemTag", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("ItemId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("TagId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("ManifestId", "ItemId", "TagId");
b.HasIndex("ItemId");
b.HasIndex("TagId");
b.HasIndex("ManifestId", "TagId");
b.ToTable("ItemTags");
});
modelBuilder.Entity("AliasClientDb.Logo", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<DateTime?>("FetchedAt")
.HasColumnType("TEXT");
b.Property<byte[]>("FileData")
.HasColumnType("BLOB");
b.Property<string>("FileDataHash")
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<string>("Kind")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(20)
.HasColumnType("TEXT")
.HasDefaultValue("favicon");
b.Property<string>("MimeType")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<string>("Source")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("ManifestId", "Id");
b.HasIndex("ManifestId", "Kind", "Source")
.IsUnique();
b.ToTable("Logos");
});
modelBuilder.Entity("AliasClientDb.Manifest", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Manifests");
});
modelBuilder.Entity("AliasClientDb.Passkey", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<byte[]>("AdditionalData")
.HasColumnType("BLOB");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<byte[]>("CredentialId")
.HasMaxLength(1023)
.HasColumnType("BLOB");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<string>("ItemId")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<byte[]>("PrfKey")
.HasMaxLength(64)
.HasColumnType("BLOB");
b.Property<string>("PrivateKey")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("PublicKey")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("RpId")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.Property<byte[]>("UserHandle")
.IsRequired()
.HasColumnType("BLOB");
b.HasKey("ManifestId", "Id");
b.HasIndex("RpId");
b.HasIndex("ManifestId", "ItemId");
b.ToTable("Passkeys");
});
modelBuilder.Entity("AliasClientDb.Setting", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Key")
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.Property<string>("Value")
.HasColumnType("TEXT");
b.HasKey("ManifestId", "Key");
b.ToTable("Settings");
});
modelBuilder.Entity("AliasClientDb.Tag", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Color")
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<int>("DisplayOrder")
.HasColumnType("INTEGER");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("ManifestId", "Id");
b.HasIndex("ManifestId", "Name");
b.ToTable("Tags");
});
modelBuilder.Entity("AliasClientDb.TotpCode", b =>
{
b.Property<string>("ManifestId")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Algorithm")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(20)
.HasColumnType("TEXT")
.HasDefaultValue("SHA1");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<int>("Digits")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(6);
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<string>("ItemId")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<int>("Period")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(30);
b.Property<string>("SecretKey")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("ManifestId", "Id");
b.HasIndex("ManifestId", "ItemId");
b.ToTable("TotpCodes");
});
modelBuilder.Entity("AliasClientDb.Attachment", b =>
{
b.HasOne("AliasClientDb.Item", "Item")
.WithMany("Attachments")
.HasForeignKey("ManifestId", "ItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Item");
});
modelBuilder.Entity("AliasClientDb.FieldHistory", b =>
{
b.HasOne("AliasClientDb.FieldDefinition", "FieldDefinition")
.WithMany("FieldHistories")
.HasForeignKey("ManifestId", "FieldDefinitionId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("AliasClientDb.Item", "Item")
.WithMany()
.HasForeignKey("ManifestId", "ItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("FieldDefinition");
b.Navigation("Item");
});
modelBuilder.Entity("AliasClientDb.FieldValue", b =>
{
b.HasOne("AliasClientDb.FieldDefinition", "FieldDefinition")
.WithMany("FieldValues")
.HasForeignKey("ManifestId", "FieldDefinitionId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("AliasClientDb.Item", "Item")
.WithMany("FieldValues")
.HasForeignKey("ManifestId", "ItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("FieldDefinition");
b.Navigation("Item");
});
modelBuilder.Entity("AliasClientDb.Folder", b =>
{
b.HasOne("AliasClientDb.Folder", "ParentFolder")
.WithMany("ChildFolders")
.HasForeignKey("ManifestId", "ParentFolderId")
.OnDelete(DeleteBehavior.Cascade);
b.Navigation("ParentFolder");
});
modelBuilder.Entity("AliasClientDb.Item", b =>
{
b.HasOne("AliasClientDb.Folder", "Folder")
.WithMany("Items")
.HasForeignKey("ManifestId", "FolderId");
b.HasOne("AliasClientDb.Logo", "Logo")
.WithMany("Items")
.HasForeignKey("ManifestId", "LogoId");
b.Navigation("Folder");
b.Navigation("Logo");
});
modelBuilder.Entity("AliasClientDb.ItemTag", b =>
{
b.HasOne("AliasClientDb.Item", "Item")
.WithMany("ItemTags")
.HasForeignKey("ManifestId", "ItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("AliasClientDb.Tag", "Tag")
.WithMany("ItemTags")
.HasForeignKey("ManifestId", "TagId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Item");
b.Navigation("Tag");
});
modelBuilder.Entity("AliasClientDb.Passkey", b =>
{
b.HasOne("AliasClientDb.Item", "Item")
.WithMany("Passkeys")
.HasForeignKey("ManifestId", "ItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Item");
});
modelBuilder.Entity("AliasClientDb.TotpCode", b =>
{
b.HasOne("AliasClientDb.Item", "Item")
.WithMany("TotpCodes")
.HasForeignKey("ManifestId", "ItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Item");
});
modelBuilder.Entity("AliasClientDb.FieldDefinition", b =>
{
b.Navigation("FieldHistories");
b.Navigation("FieldValues");
});
modelBuilder.Entity("AliasClientDb.Folder", b =>
{
b.Navigation("ChildFolders");
b.Navigation("Items");
});
modelBuilder.Entity("AliasClientDb.Item", b =>
{
b.Navigation("Attachments");
b.Navigation("FieldValues");
b.Navigation("ItemTags");
b.Navigation("Passkeys");
b.Navigation("TotpCodes");
});
modelBuilder.Entity("AliasClientDb.Logo", b =>
{
b.Navigation("Items");
});
modelBuilder.Entity("AliasClientDb.Tag", b =>
{
b.Navigation("ItemTags");
});
#pragma warning restore 612, 618
}
}
}