//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SecureBank.Database;
#nullable disable
namespace SecureBank.Database.Migrations
{
[DbContext(typeof(DatabaseContext))]
partial class DatabaseContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.1");
modelBuilder.Entity("SecureBank.Database.Account", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Address")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("CardCVV")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("BLOB");
b.Property("CardExpirationDate")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("BLOB");
b.Property("CardNumber")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("BLOB");
b.Property("Email")
.IsRequired()
.HasMaxLength(300)
.HasColumnType("TEXT");
b.Property("FirstName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("IBAN")
.IsRequired()
.HasMaxLength(26)
.HasColumnType("TEXT");
b.Property("IdCardNumber")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("BLOB");
b.Property("IsAdmin")
.HasColumnType("INTEGER");
b.Property("LastName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("LockReason")
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("LoginFailedCount")
.HasColumnType("INTEGER");
b.Property("PESEL")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("BLOB");
b.Property("PhoneNumber")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("TEXT");
b.Property("TemporaryPassword")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Accounts");
});
modelBuilder.Entity("SecureBank.Database.AccountLoginRequest", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("AccountPasswordId")
.HasColumnType("INTEGER");
b.Property("ValidTo")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AccountPasswordId");
b.ToTable("AccountLoginRequests");
});
modelBuilder.Entity("SecureBank.Database.AccountPassword", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountId")
.HasColumnType("INTEGER");
b.Property("LeftSalt")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("TEXT");
b.Property("Password")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("BLOB");
b.Property("RightSalt")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AccountId");
b.ToTable("AccountPasswords");
});
modelBuilder.Entity("SecureBank.Database.AccountPasswordIndex", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AccountPasswordId")
.HasColumnType("INTEGER");
b.Property("Index")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("AccountPasswordId");
b.ToTable("AccountPasswordIndexes");
});
modelBuilder.Entity("SecureBank.Database.Transfer", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Amount")
.HasPrecision(14, 2)
.HasColumnType("TEXT");
b.Property("Date")
.HasColumnType("TEXT");
b.Property("ReceiverAccountNumber")
.IsRequired()
.HasMaxLength(26)
.HasColumnType("TEXT");
b.Property("ReceiverAddress")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("ReceiverName")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("SenderAccountNumber")
.IsRequired()
.HasMaxLength(26)
.HasColumnType("TEXT");
b.Property("SenderAddress")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("SenderName")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Title")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Transfers");
});
modelBuilder.Entity("SecureBank.Database.AccountLoginRequest", b =>
{
b.HasOne("SecureBank.Database.AccountPassword", "AccountPassword")
.WithMany()
.HasForeignKey("AccountPasswordId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("AccountPassword");
});
modelBuilder.Entity("SecureBank.Database.AccountPassword", b =>
{
b.HasOne("SecureBank.Database.Account", "Account")
.WithMany("AccountPasswords")
.HasForeignKey("AccountId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("SecureBank.Database.AccountPasswordIndex", b =>
{
b.HasOne("SecureBank.Database.AccountPassword", "AccountPassword")
.WithMany()
.HasForeignKey("AccountPasswordId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("AccountPassword");
});
modelBuilder.Entity("SecureBank.Database.Account", b =>
{
b.Navigation("AccountPasswords");
});
#pragma warning restore 612, 618
}
}
}