Files
SecureBank/SecureBank.Database/Migrations/DatabaseContextModelSnapshot.cs

258 lines
8.7 KiB
C#
Raw Normal View History

2024-01-19 17:25:56 +01:00
// <auto-generated />
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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2024-01-23 15:41:59 +01:00
b.Property<string>("Address")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<byte[]>("CardCVV")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("BLOB");
b.Property<byte[]>("CardExpirationDate")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("BLOB");
b.Property<byte[]>("CardNumber")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("BLOB");
2024-01-19 17:25:56 +01:00
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(300)
.HasColumnType("TEXT");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
2024-01-23 15:41:59 +01:00
b.Property<string>("IBAN")
.IsRequired()
.HasMaxLength(26)
.HasColumnType("TEXT");
b.Property<byte[]>("IdCardNumber")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("BLOB");
b.Property<bool>("IsAdmin")
.HasColumnType("INTEGER");
2024-01-19 17:25:56 +01:00
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("LockReason")
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<byte>("LoginFailedCount")
.HasColumnType("INTEGER");
2024-01-23 15:41:59 +01:00
b.Property<byte[]>("PESEL")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("BLOB");
2024-01-19 17:25:56 +01:00
b.Property<string>("PhoneNumber")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("TEXT");
b.Property<bool>("TemporaryPassword")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Accounts");
});
modelBuilder.Entity("SecureBank.Database.AccountLoginRequest", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<long>("AccountPasswordId")
.HasColumnType("INTEGER");
b.Property<DateTime>("ValidTo")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AccountPasswordId");
b.ToTable("AccountLoginRequests");
});
modelBuilder.Entity("SecureBank.Database.AccountPassword", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("AccountId")
.HasColumnType("INTEGER");
b.Property<string>("LeftSalt")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("TEXT");
b.Property<byte[]>("Password")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("BLOB");
b.Property<string>("RightSalt")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AccountId");
b.ToTable("AccountPasswords");
});
modelBuilder.Entity("SecureBank.Database.AccountPasswordIndex", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<long>("AccountPasswordId")
.HasColumnType("INTEGER");
b.Property<byte>("Index")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("AccountPasswordId");
b.ToTable("AccountPasswordIndexes");
});
2024-01-23 15:41:59 +01:00
modelBuilder.Entity("SecureBank.Database.Transfer", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<decimal>("Amount")
.HasPrecision(14, 2)
.HasColumnType("TEXT");
b.Property<DateTime>("Date")
.HasColumnType("TEXT");
b.Property<string>("ReceiverAccountNumber")
.IsRequired()
.HasMaxLength(26)
.HasColumnType("TEXT");
b.Property<string>("ReceiverAddress")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("ReceiverName")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("SenderAccountNumber")
.IsRequired()
.HasMaxLength(26)
.HasColumnType("TEXT");
b.Property<string>("SenderAddress")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("SenderName")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Transfers");
});
2024-01-19 17:25:56 +01:00
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
}
}
}