mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-01-21 04:21:11 -05:00
433 lines
14 KiB
C#
433 lines
14 KiB
C#
// <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", "9.0.4")
|
|
.HasAnnotation("Proxies:ChangeTracking", false)
|
|
.HasAnnotation("Proxies:CheckEquality", false)
|
|
.HasAnnotation("Proxies:LazyLoading", true);
|
|
|
|
modelBuilder.Entity("AliasClientDb.Alias", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("BirthDate")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FirstName")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("VARCHAR");
|
|
|
|
b.Property<string>("Gender")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("VARCHAR");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("LastName")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("VARCHAR");
|
|
|
|
b.Property<string>("NickName")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("VARCHAR");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Aliases");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasClientDb.Attachment", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<byte[]>("Blob")
|
|
.IsRequired()
|
|
.HasColumnType("BLOB");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("CredentialId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Filename")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CredentialId");
|
|
|
|
b.ToTable("Attachments");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasClientDb.Credential", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("AliasId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Notes")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("ServiceId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Username")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AliasId");
|
|
|
|
b.HasIndex("ServiceId");
|
|
|
|
b.ToTable("Credentials");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasClientDb.EncryptionKey", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
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("Id");
|
|
|
|
b.ToTable("EncryptionKeys");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasClientDb.Passkey", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<byte[]>("AdditionalData")
|
|
.HasColumnType("BLOB");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("CredentialId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("DisplayName")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("INTEGER");
|
|
|
|
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("Id");
|
|
|
|
b.HasIndex("CredentialId");
|
|
|
|
b.HasIndex("RpId");
|
|
|
|
b.ToTable("Passkeys");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasClientDb.Password", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("CredentialId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Value")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CredentialId");
|
|
|
|
b.ToTable("Passwords");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasClientDb.Service", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<byte[]>("Logo")
|
|
.HasColumnType("BLOB");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Url")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Services");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasClientDb.Setting", b =>
|
|
{
|
|
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("Key");
|
|
|
|
b.ToTable("Settings");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasClientDb.TotpCode", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("CredentialId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("SecretKey")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("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.Passkey", b =>
|
|
{
|
|
b.HasOne("AliasClientDb.Credential", "Credential")
|
|
.WithMany("Passkeys")
|
|
.HasForeignKey("CredentialId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Credential");
|
|
});
|
|
|
|
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("Passkeys");
|
|
|
|
b.Navigation("Passwords");
|
|
|
|
b.Navigation("TotpCodes");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasClientDb.Service", b =>
|
|
{
|
|
b.Navigation("Credentials");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|