summaryrefslogtreecommitdiff
path: root/Migrations/ApplicationDbContextModelSnapshot.cs
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2022-11-22 16:46:46 -0600
committerHombreLaser <sebastian-440@live.com>2022-11-22 16:46:46 -0600
commit214cd4db690635ba2a30183c1679c3e4d7b8e896 (patch)
tree95de21f42a07c27cdfa5b50be25ae97bab3abefe /Migrations/ApplicationDbContextModelSnapshot.cs
parentea20e100d4afe4429ab4c24926bffc0a8f9b9b70 (diff)
Añadido modelo de ticket
Diffstat (limited to 'Migrations/ApplicationDbContextModelSnapshot.cs')
-rw-r--r--Migrations/ApplicationDbContextModelSnapshot.cs61
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
}
}