diff options
Diffstat (limited to 'Migrations/ApplicationDbContextModelSnapshot.cs')
-rw-r--r-- | Migrations/ApplicationDbContextModelSnapshot.cs | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/Migrations/ApplicationDbContextModelSnapshot.cs b/Migrations/ApplicationDbContextModelSnapshot.cs index 9fceb51..556a52f 100644 --- a/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Migrations/ApplicationDbContextModelSnapshot.cs @@ -43,7 +43,39 @@ namespace BackendPIA.Migrations b.HasKey("Id"); - b.ToTable("Raffles", (string)null); + b.ToTable("Raffles"); + }); + + modelBuilder.Entity("BackendPIA.Models.Ticket", b => + { + b.Property<long>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id")); + + b.Property<bool>("IsWinner") + .HasColumnType("boolean"); + + b.Property<int>("Number") + .HasColumnType("integer"); + + b.Property<string>("OwnerId") + .HasColumnType("text"); + + b.Property<long>("RaffleId") + .HasColumnType("bigint"); + + b.Property<long>("UserAccountId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("OwnerId"); + + b.HasIndex("RaffleId"); + + b.ToTable("Tickets"); }); modelBuilder.Entity("BackendPIA.Models.UserAccount", b => @@ -249,6 +281,23 @@ namespace BackendPIA.Migrations b.ToTable("AspNetUserTokens", (string)null); }); + modelBuilder.Entity("BackendPIA.Models.Ticket", b => + { + b.HasOne("BackendPIA.Models.UserAccount", "Owner") + .WithMany("Tickets") + .HasForeignKey("OwnerId"); + + b.HasOne("BackendPIA.Models.Raffle", "Raffle") + .WithMany("Tickets") + .HasForeignKey("RaffleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + + b.Navigation("Raffle"); + }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) @@ -299,6 +348,16 @@ namespace BackendPIA.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("BackendPIA.Models.Raffle", b => + { + b.Navigation("Tickets"); + }); + + modelBuilder.Entity("BackendPIA.Models.UserAccount", b => + { + b.Navigation("Tickets"); + }); #pragma warning restore 612, 618 } } |