mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-20 07:39:07 -04:00
485 lines
16 KiB
C#
485 lines
16 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using AliasServerDb;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace AliasServerDb.Migrations.SqliteMigrations
|
|
{
|
|
[DbContext(typeof(AliasServerDbContextSqlite))]
|
|
[Migration("20240720211546_AddAdminUsersTable")]
|
|
partial class AddAdminUsersTable
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.6")
|
|
.HasAnnotation("Proxies:ChangeTracking", false)
|
|
.HasAnnotation("Proxies:CheckEquality", false)
|
|
.HasAnnotation("Proxies:LazyLoading", true);
|
|
|
|
modelBuilder.Entity("AliasServerDb.AdminRole", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("AdminRoles");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.AdminUser", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("AdminUsers");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.AliasVaultRole", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("AliasVaultRoles");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.AliasVaultUser", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Salt")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Verifier")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("AliasVaultUsers");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.AliasVaultUserRefreshToken", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("DeviceIdentifier")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("ExpireDate")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Value")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AliasVaultUserRefreshTokens");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.Email", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("Date")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateSystem")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("From")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FromDomain")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FromLocal")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("MessageHtml")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("MessagePlain")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("MessagePreview")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("MessageSource")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("PushNotificationSent")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Subject")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("To")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ToDomain")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ToLocal")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("Visible")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Date");
|
|
|
|
b.HasIndex("DateSystem");
|
|
|
|
b.HasIndex("PushNotificationSent");
|
|
|
|
b.HasIndex("ToLocal");
|
|
|
|
b.HasIndex("Visible");
|
|
|
|
b.ToTable("Emails");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.EmailAttachment", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<byte[]>("Bytes")
|
|
.IsRequired()
|
|
.HasColumnType("BLOB");
|
|
|
|
b.Property<DateTime>("Date")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("EmailId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Filename")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Filesize")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("MimeType")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("EmailId");
|
|
|
|
b.ToTable("EmailAttachments");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.Vault", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("VaultBlob")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Version")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Vaults");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("RoleId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("RoleClaims", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("UserClaims", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
{
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ProviderKey")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ProviderDisplayName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("LoginProvider", "ProviderKey");
|
|
|
|
b.ToTable("UserLogins", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("RoleId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("UserId", "RoleId");
|
|
|
|
b.ToTable("UserRoles", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("UserId", "LoginProvider", "Name");
|
|
|
|
b.ToTable("UserTokens", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.AliasVaultUserRefreshToken", b =>
|
|
{
|
|
b.HasOne("AliasServerDb.AliasVaultUser", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.EmailAttachment", b =>
|
|
{
|
|
b.HasOne("AliasServerDb.Email", "Email")
|
|
.WithMany("Attachments")
|
|
.HasForeignKey("EmailId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Email");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.Vault", b =>
|
|
{
|
|
b.HasOne("AliasServerDb.AliasVaultUser", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("AliasServerDb.Email", b =>
|
|
{
|
|
b.Navigation("Attachments");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|