// using System; using BudgetApp.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace BudgetApp.Data.Migrations { [DbContext(typeof(ApplicationDbContext))] partial class ApplicationDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.3"); modelBuilder.Entity("BudgetApp.Data.Account", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Color") .IsRequired() .HasMaxLength(7) .HasColumnType("TEXT"); b.Property("CurrencyCode") .IsRequired() .HasMaxLength(3) .HasColumnType("TEXT"); b.Property("CurrentBalance") .HasColumnType("decimal(18,2)"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("Accounts"); }); modelBuilder.Entity("BudgetApp.Data.ApplicationUser", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AccessFailedCount") .HasColumnType("INTEGER"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property("Email") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("EmailConfirmed") .HasColumnType("INTEGER"); b.Property("LockoutEnabled") .HasColumnType("INTEGER"); b.Property("LockoutEnd") .HasColumnType("TEXT"); b.Property("NormalizedEmail") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("NormalizedUserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("PasswordHash") .HasColumnType("TEXT"); b.Property("PhoneNumber") .HasColumnType("TEXT"); b.Property("PhoneNumberConfirmed") .HasColumnType("INTEGER"); b.Property("SecurityStamp") .HasColumnType("TEXT"); b.Property("TwoFactorEnabled") .HasColumnType("INTEGER"); b.Property("UserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex"); b.ToTable("AspNetUsers", (string)null); }); modelBuilder.Entity("BudgetApp.Data.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Icon") .IsRequired() .HasMaxLength(10) .HasColumnType("TEXT"); b.Property("IsDefault") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("Categories"); }); modelBuilder.Entity("BudgetApp.Data.Salary", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AccountId") .HasColumnType("INTEGER"); b.Property("Amount") .HasColumnType("decimal(18,2)"); b.Property("CategoryId") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("RecurrenceType") .HasColumnType("INTEGER"); b.Property("StartDate") .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("AccountId"); b.HasIndex("CategoryId"); b.HasIndex("UserId"); b.ToTable("Salaries"); }); modelBuilder.Entity("BudgetApp.Data.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AccountId") .HasColumnType("INTEGER"); b.Property("Amount") .HasColumnType("decimal(18,2)"); b.Property("CategoryId") .HasColumnType("INTEGER"); b.Property("Date") .HasColumnType("TEXT"); b.Property("Description") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("IsPaid") .HasColumnType("INTEGER"); b.Property("ParentTransactionId") .HasColumnType("INTEGER"); b.Property("RecurrenceEndDate") .HasColumnType("TEXT"); b.Property("RecurrenceType") .HasColumnType("INTEGER"); b.Property("SalaryId") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("AccountId"); b.HasIndex("CategoryId"); b.HasIndex("ParentTransactionId"); b.HasIndex("SalaryId"); b.ToTable("Transactions"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("NormalizedName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedName") .IsUnique() .HasDatabaseName("RoleNameIndex"); b.ToTable("AspNetRoles", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClaimType") .HasColumnType("TEXT"); b.Property("ClaimValue") .HasColumnType("TEXT"); b.Property("RoleId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("AspNetRoleClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClaimType") .HasColumnType("TEXT"); b.Property("ClaimValue") .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("AspNetUserClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") .HasColumnType("TEXT"); b.Property("ProviderKey") .HasColumnType("TEXT"); b.Property("ProviderDisplayName") .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("AspNetUserLogins", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("RoleId") .HasColumnType("TEXT"); b.HasKey("UserId", "RoleId"); b.HasIndex("RoleId"); b.ToTable("AspNetUserRoles", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("LoginProvider") .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("AspNetUserTokens", (string)null); }); modelBuilder.Entity("BudgetApp.Data.Account", b => { b.HasOne("BudgetApp.Data.ApplicationUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("BudgetApp.Data.Category", b => { b.HasOne("BudgetApp.Data.ApplicationUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("BudgetApp.Data.Salary", b => { b.HasOne("BudgetApp.Data.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BudgetApp.Data.Category", "Category") .WithMany() .HasForeignKey("CategoryId"); b.HasOne("BudgetApp.Data.ApplicationUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Account"); b.Navigation("Category"); b.Navigation("User"); }); modelBuilder.Entity("BudgetApp.Data.Transaction", b => { b.HasOne("BudgetApp.Data.Account", "Account") .WithMany("Transactions") .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BudgetApp.Data.Category", "Category") .WithMany("Transactions") .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("BudgetApp.Data.Transaction", "ParentTransaction") .WithMany() .HasForeignKey("ParentTransactionId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("BudgetApp.Data.Salary", "Salary") .WithMany() .HasForeignKey("SalaryId") .OnDelete(DeleteBehavior.SetNull); b.Navigation("Account"); b.Navigation("Category"); b.Navigation("ParentTransaction"); b.Navigation("Salary"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.HasOne("BudgetApp.Data.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.HasOne("BudgetApp.Data.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BudgetApp.Data.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.HasOne("BudgetApp.Data.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("BudgetApp.Data.Account", b => { b.Navigation("Transactions"); }); modelBuilder.Entity("BudgetApp.Data.Category", b => { b.Navigation("Transactions"); }); #pragma warning restore 612, 618 } } }