summaryrefslogtreecommitdiff
path: root/Migrations/LibraryContextModelSnapshot.cs
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2022-09-15 16:52:16 -0500
committerHombreLaser <sebastian-440@live.com>2022-09-15 16:52:16 -0500
commit0bcbc7f4721830a1a65fbd2e30fbb69f803884c2 (patch)
treef1fb8bb0c51ea7851f57731a95a05b74d7f2bbc8 /Migrations/LibraryContextModelSnapshot.cs
parent2ef25a3fad449f8a05491db4a46fc3990c27cf15 (diff)
Añadir base de datos
Diffstat (limited to 'Migrations/LibraryContextModelSnapshot.cs')
-rw-r--r--Migrations/LibraryContextModelSnapshot.cs54
1 files changed, 54 insertions, 0 deletions
diff --git a/Migrations/LibraryContextModelSnapshot.cs b/Migrations/LibraryContextModelSnapshot.cs
new file mode 100644
index 0000000..734dcc0
--- /dev/null
+++ b/Migrations/LibraryContextModelSnapshot.cs
@@ -0,0 +1,54 @@
+// <auto-generated />
+using System;
+using LibraryAPI.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace LibraryAPI.Migrations
+{
+ [DbContext(typeof(LibraryContext))]
+ partial class LibraryContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "6.0.9")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("LibraryAPI.Models.Book", b =>
+ {
+ b.Property<long>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
+
+ b.Property<int>("Edition")
+ .HasColumnType("integer");
+
+ b.Property<string[]>("Genres")
+ .IsRequired()
+ .HasColumnType("text[]");
+
+ b.Property<string>("ISBN")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property<DateTime>("PublicationDate")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.ToTable("Books");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}