From 188b33618e77dc8552d330e329962cd435681ec8 Mon Sep 17 00:00:00 2001 From: Gulum Date: Sat, 6 Jun 2026 01:07:19 +0200 Subject: [PATCH] =?UTF-8?q?DATA-2:=20amendments=20=E2=80=94=20GerbilStatus?= =?UTF-8?q?.ForSale,=20Contact=20structured=20fields,=2073-variety=20seed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GerbilStatus += ForSale ("Abzugeben", FEAT-12 sale listing); enum-as-string, no DB change. - Contact: contactInfo -> structured email/phone/address (FEAT-13 sale contracts); name/notes kept. - ColorVariety seed 18 -> 73 from Kevin's GEN-2 colorVarietySeed.generated.json (18 frozen first). - Regenerated InitialCreate migration (Contacts email/phone/address cols, 73 seed rows). --- GerbilManagerWebAPI/ApplicationContext.cs | 95 +- GerbilManagerWebAPI/Dtos/ApiDtos.cs | 4 +- .../Endpoints/ContactEndpoints.cs | 6 +- .../20260605225413_InitialCreate.Designer.cs | 500 ---------- .../20260605230614_InitialCreate.Designer.cs | 891 ++++++++++++++++++ ...ate.cs => 20260605230614_InitialCreate.cs} | 61 +- .../ApplicationContextModelSnapshot.cs | 393 +++++++- GerbilManagerWebAPI/Models/Contact.cs | 4 +- GerbilManagerWebAPI/Models/GerbilStatus.cs | 4 +- 9 files changed, 1429 insertions(+), 529 deletions(-) delete mode 100644 GerbilManagerWebAPI/Migrations/20260605225413_InitialCreate.Designer.cs create mode 100644 GerbilManagerWebAPI/Migrations/20260605230614_InitialCreate.Designer.cs rename GerbilManagerWebAPI/Migrations/{20260605225413_InitialCreate.cs => 20260605230614_InitialCreate.cs} (66%) diff --git a/GerbilManagerWebAPI/ApplicationContext.cs b/GerbilManagerWebAPI/ApplicationContext.cs index 9b84c5d..aae01c7 100644 --- a/GerbilManagerWebAPI/ApplicationContext.cs +++ b/GerbilManagerWebAPI/ApplicationContext.cs @@ -63,31 +63,88 @@ public class ApplicationContext : DbContext } /// - /// Seed the 18 base varieties from the GEN-1 catalog (gerbil-manager-web/src/genetics/catalog.ts). - /// Source of truth for names; the baseportal 78-variety extension lands in GEN-2 (re-seed later). + /// Seed the colour-variety catalog. Source of truth = Kevin's GEN-2 generated list + /// (gerbil-manager-web/src/genetics/colorVarietySeed.generated.json): 73 varieties + /// (the 18 frozen-contract names first, then the baseportal.de extension), in stable + /// SortOrder. Names are UI filter keys — spelling changes route through god. /// private static void SeedColorVarieties(ModelBuilder modelBuilder) { (string Name, string Genotype)[] catalog = { ("Pink Eyed White (PEW)", "AA chch DD EE GG pp spsp rere"), - ("Hermelin", "aa chch DD EE GG PP spsp rere"), - ("Himalaya", "AA chch DD EE GG PP spsp rere"), - ("Zobel", "aa cchmcchm DD EE gg PP spsp rere"), - ("Schwarzschimmel", "AA CC DD efef GG PP spsp rere"), - ("Rotaugenschimmel", "AA CC DD efef GG pp spsp rere"), - ("Agouti", "AA CC DD EE GG PP spsp rere"), - ("Schwarz", "aa CC DD EE GG PP spsp rere"), - ("Silberagouti", "AA CC DD EE gg PP spsp rere"), - ("Anthrazit", "aa CC DD EE gg PP spsp rere"), - ("Algierfuchs", "AA CC DD ee GG PP spsp rere"), - ("Blau", "aa CC dd EE GG PP spsp rere"), - ("Gold", "AA CC DD EE GG pp spsp rere"), - ("Platin", "aa CC DD EE GG pp spsp rere"), - ("Goldfuchs", "AA CC DD ee GG pp spsp rere"), - ("Rotfuchs", "aa CC DD ee GG pp spsp rere"), - ("dd Gold", "AA CC dd EE GG pp spsp rere"), - ("dd Platin", "aa CC dd EE GG pp spsp rere"), + ("Hermelin", "aa chch DD EE GG PP spsp rere"), + ("Himalaya", "AA chch DD EE GG PP spsp rere"), + ("Zobel", "aa cchmcchm DD EE gg PP spsp rere"), + ("Schwarzschimmel", "AA CC DD efef GG PP spsp rere"), + ("Rotaugenschimmel", "AA CC DD efef GG pp spsp rere"), + ("Agouti", "AA CC DD EE GG PP spsp rere"), + ("Schwarz", "aa CC DD EE GG PP spsp rere"), + ("Silberagouti", "AA CC DD EE gg PP spsp rere"), + ("Anthrazit", "aa CC DD EE gg PP spsp rere"), + ("Algierfuchs", "AA CC DD ee GG PP spsp rere"), + ("Blau", "aa CC dd EE GG PP spsp rere"), + ("Gold", "AA CC DD EE GG pp spsp rere"), + ("Platin", "aa CC DD EE GG pp spsp rere"), + ("Goldfuchs", "AA CC DD ee GG pp spsp rere"), + ("Rotfuchs", "aa CC DD ee GG pp spsp rere"), + ("dd Gold", "AA CC dd EE GG pp spsp rere"), + ("dd Platin", "aa CC dd EE GG pp spsp rere"), + ("Altweiss (REW)", "aa CC DD EE gg pp spsp rere"), + ("Apricot (Blassfuchs)", "AA CC DD ee gg pp spsp rere"), + ("Blaufuchs", "aa CC DD ee gg PP spsp rere"), + ("C-Separator", "aa CC DD ee gg pp spsp rere"), + ("Elfenbein", "AA CC DD EE gg pp spsp rere"), + ("Kohlfuchs", "aa CC DD ee GG PP spsp rere"), + ("Marder", "aa cchmcchm DD EE GG PP spsp rere"), + ("Siam (Marder-Hell)", "aa cchmcchm DD EE GG PP spsp rere"), + ("Polarfuchs", "AA CC DD ee gg PP spsp rere"), + ("Saphir", "aa CC DD EE GG pp spsp rere"), + ("Schimmel (Orangeschimmel)", "AA CC DD efef GG PP spsp rere"), + ("Topas", "AA CC DD EE GG pp spsp rere"), + ("Platin-Hell", "aa CC DD EE GG pp spsp rere"), + ("Agouti dd", "AA CC dd EE GG PP spsp rere"), + ("Silberagouti dd", "AA CC dd EE gg PP spsp rere"), + ("Kohlfuchs dd", "aa CC dd ee GG PP spsp rere"), + ("Anthrazit dd", "aa CC dd EE gg PP spsp rere"), + ("Agouti CP-Hell", "AA cchmcchm DD EE GG PP spsp rere"), + ("Blaufuchs CP", "aa cchmcchm DD ee gg PP spsp rere"), + ("Polarfuchsschimmel", "AA CC DD efef gg PP spsp rere"), + ("Silberschimmel", "AA CC DD efef gg PP spsp rere"), + ("Algierfuchsschimmel", "AA CC DD efef GG PP spsp rere"), + ("Polarfuchs-Hell CP", "AA cchmcchm DD ee gg PP spsp rere"), + ("Kohlfuchsschimmel", "aa CC DD efef GG PP spsp rere"), + ("Blaufuchsschimmel", "aa CC DD efef gg PP spsp rere"), + ("Kohlfuchs, hell", "aa CC DD ee GG PP spsp rere"), + ("Goldfuchs, hell", "AA CC DD ee GG pp spsp rere"), + ("Goldfuchsschimmel", "AA CC DD efef GG pp spsp rere"), + ("Gold-Hell", "AA CC DD EE GG pp spsp rere"), + ("Siam (Marder-Hell) dd", "aa cchmcchm dd EE GG PP spsp rere"), + ("Marder dd", "aa cchmcchm dd EE GG PP spsp rere"), + ("Zobel-Hell", "aa cchmcchm DD EE gg PP spsp rere"), + ("Silberagouti dd CP", "AA cchmcchm dd EE gg PP spsp rere"), + ("Silberagouti-Hell dd CP", "AA cchmcchm dd EE gg PP spsp rere"), + ("Agouti dd CP", "AA cchmcchm dd EE GG PP spsp rere"), + ("Agouti-Hell dd CP", "AA cchmcchm dd EE GG PP spsp rere"), + ("Blaufuchs, hell", "aa CC DD ee gg PP spsp rere"), + ("Rotfuchsschimmel", "aa CC DD efef GG pp spsp rere"), + ("Polarfuchs, hell", "AA CC DD ee gg PP spsp rere"), + ("Kohlfuchsschimmel, hell", "aa CC DD efef GG PP spsp rere"), + ("Rotfuchs, hell", "aa CC DD ee GG pp spsp rere"), + ("Zobel dd", "aa cchmcchm dd EE gg PP spsp rere"), + ("Kohlfuchs-Hell", "aa CC DD ee GG PP spsp rere"), + ("Kohlfuchs CP", "aa cchmcchm DD ee GG PP spsp rere"), + ("Algierfuchs CP", "AA cchmcchm DD ee GG PP spsp rere"), + ("Silberagouti CP", "AA cchmcchm DD EE gg PP spsp rere"), + ("Agouti CP", "AA cchmcchm DD EE GG PP spsp rere"), + ("Algierfuchs-Hell CP", "AA cchmcchm DD ee GG PP spsp rere"), + ("Kohlfuchs,hell CP", "aa cchmcchm DD ee GG PP spsp rere"), + ("Polarfuchs CP", "AA cchmcchm DD ee gg PP spsp rere"), + ("Algierfuchs, hell", "AA CC DD ee GG PP spsp rere"), + ("Topas dd", "AA CC dd EE GG pp spsp rere"), + ("Zobel-Hell dd", "aa cchmcchm dd EE gg PP spsp rere"), + ("Kohlfuchsschimmel CP", "aa cchmcchm DD efef GG PP spsp rere"), + ("Blaufuchs dd", "aa CC dd ee gg PP spsp rere"), }; var rows = new ColorVariety[catalog.Length]; diff --git a/GerbilManagerWebAPI/Dtos/ApiDtos.cs b/GerbilManagerWebAPI/Dtos/ApiDtos.cs index f25744a..8c735e2 100644 --- a/GerbilManagerWebAPI/Dtos/ApiDtos.cs +++ b/GerbilManagerWebAPI/Dtos/ApiDtos.cs @@ -36,7 +36,7 @@ namespace GerbilManagerWebAPI.Dtos DateOnly? ExpectedGoHomeDate, string? Notes); - public record ContactDto(Guid Id, string Name, string? ContactInfo, string? Notes); + public record ContactDto(Guid Id, string Name, string? Email, string? Phone, string? Address, string? Notes); public record EnclosureDto(Guid Id, string Name, string? Notes); @@ -80,7 +80,7 @@ namespace GerbilManagerWebAPI.Dtos DateOnly? ExpectedGoHomeDate, string? Notes); - public record ContactInput(string Name, string? ContactInfo, string? Notes); + public record ContactInput(string Name, string? Email, string? Phone, string? Address, string? Notes); public record EnclosureInput(string Name, string? Notes); diff --git a/GerbilManagerWebAPI/Endpoints/ContactEndpoints.cs b/GerbilManagerWebAPI/Endpoints/ContactEndpoints.cs index 6091e45..44252a0 100644 --- a/GerbilManagerWebAPI/Endpoints/ContactEndpoints.cs +++ b/GerbilManagerWebAPI/Endpoints/ContactEndpoints.cs @@ -24,7 +24,7 @@ namespace GerbilManagerWebAPI.Endpoints group.MapPost("/", async (ContactInput input, ApplicationContext db) => { - var c = new Contact { Id = Guid.NewGuid(), Name = input.Name, ContactInfo = input.ContactInfo, Notes = input.Notes }; + var c = new Contact { Id = Guid.NewGuid(), Name = input.Name, Email = input.Email, Phone = input.Phone, Address = input.Address, Notes = input.Notes }; db.Contacts.Add(c); await db.SaveChangesAsync(); return TypedResults.Created($"/contacts/{c.Id}", ToDto(c)); @@ -34,7 +34,7 @@ namespace GerbilManagerWebAPI.Endpoints { var c = await db.Contacts.FirstOrDefaultAsync(x => x.Id == id); if (c is null) return TypedResults.NotFound(); - c.Name = input.Name; c.ContactInfo = input.ContactInfo; c.Notes = input.Notes; + c.Name = input.Name; c.Email = input.Email; c.Phone = input.Phone; c.Address = input.Address; c.Notes = input.Notes; await db.SaveChangesAsync(); return TypedResults.NoContent(); }); @@ -54,6 +54,6 @@ namespace GerbilManagerWebAPI.Endpoints return app; } - private static ContactDto ToDto(Contact c) => new(c.Id, c.Name, c.ContactInfo, c.Notes); + private static ContactDto ToDto(Contact c) => new(c.Id, c.Name, c.Email, c.Phone, c.Address, c.Notes); } } diff --git a/GerbilManagerWebAPI/Migrations/20260605225413_InitialCreate.Designer.cs b/GerbilManagerWebAPI/Migrations/20260605225413_InitialCreate.Designer.cs deleted file mode 100644 index 933eafd..0000000 --- a/GerbilManagerWebAPI/Migrations/20260605225413_InitialCreate.Designer.cs +++ /dev/null @@ -1,500 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace GerbilManagerWebAPI.Migrations -{ - [DbContext(typeof(ApplicationContext))] - [Migration("20260605225413_InitialCreate")] - partial class InitialCreate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.ColorVariety", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CanonicalGenotype") - .HasColumnType("text"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text"); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.ToTable("ColorVarieties"); - - b.HasData( - new - { - Id = new Guid("00000000-0000-0000-0000-000000000001"), - CanonicalGenotype = "AA chch DD EE GG pp spsp rere", - Name = "Pink Eyed White (PEW)", - SortOrder = 0 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000002"), - CanonicalGenotype = "aa chch DD EE GG PP spsp rere", - Name = "Hermelin", - SortOrder = 1 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000003"), - CanonicalGenotype = "AA chch DD EE GG PP spsp rere", - Name = "Himalaya", - SortOrder = 2 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000004"), - CanonicalGenotype = "aa cchmcchm DD EE gg PP spsp rere", - Name = "Zobel", - SortOrder = 3 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000005"), - CanonicalGenotype = "AA CC DD efef GG PP spsp rere", - Name = "Schwarzschimmel", - SortOrder = 4 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000006"), - CanonicalGenotype = "AA CC DD efef GG pp spsp rere", - Name = "Rotaugenschimmel", - SortOrder = 5 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000007"), - CanonicalGenotype = "AA CC DD EE GG PP spsp rere", - Name = "Agouti", - SortOrder = 6 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000008"), - CanonicalGenotype = "aa CC DD EE GG PP spsp rere", - Name = "Schwarz", - SortOrder = 7 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000009"), - CanonicalGenotype = "AA CC DD EE gg PP spsp rere", - Name = "Silberagouti", - SortOrder = 8 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000010"), - CanonicalGenotype = "aa CC DD EE gg PP spsp rere", - Name = "Anthrazit", - SortOrder = 9 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000011"), - CanonicalGenotype = "AA CC DD ee GG PP spsp rere", - Name = "Algierfuchs", - SortOrder = 10 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000012"), - CanonicalGenotype = "aa CC dd EE GG PP spsp rere", - Name = "Blau", - SortOrder = 11 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000013"), - CanonicalGenotype = "AA CC DD EE GG pp spsp rere", - Name = "Gold", - SortOrder = 12 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000014"), - CanonicalGenotype = "aa CC DD EE GG pp spsp rere", - Name = "Platin", - SortOrder = 13 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000015"), - CanonicalGenotype = "AA CC DD ee GG pp spsp rere", - Name = "Goldfuchs", - SortOrder = 14 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000016"), - CanonicalGenotype = "aa CC DD ee GG pp spsp rere", - Name = "Rotfuchs", - SortOrder = 15 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000017"), - CanonicalGenotype = "AA CC dd EE GG pp spsp rere", - Name = "dd Gold", - SortOrder = 16 - }, - new - { - Id = new Guid("00000000-0000-0000-0000-000000000018"), - CanonicalGenotype = "aa CC dd EE GG pp spsp rere", - Name = "dd Platin", - SortOrder = 17 - }); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.Contact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ContactInfo") - .HasColumnType("text"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text"); - - b.Property("Notes") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.ToTable("Contacts"); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.Enclosure", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text"); - - b.Property("Notes") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.ToTable("Enclosures"); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.Gerbil", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CauseOfDeath") - .HasColumnType("text"); - - b.Property("ColorVarietyId") - .HasColumnType("uuid"); - - b.Property("DateOfBirth") - .HasColumnType("date"); - - b.Property("DateOfDeath") - .HasColumnType("date"); - - b.Property("EnclosureId") - .HasColumnType("uuid"); - - b.Property("ExternalRef") - .HasColumnType("text"); - - b.Property("Gender") - .IsRequired() - .HasColumnType("text"); - - b.Property("Genotype") - .HasColumnType("text"); - - b.Property("GoHomeDate") - .HasColumnType("date"); - - b.Property("ImportSource") - .HasColumnType("text"); - - b.Property("LitterId") - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text"); - - b.Property("Notes") - .HasColumnType("text"); - - b.Property("OriginContactId") - .HasColumnType("uuid"); - - b.Property("ReceiverContactId") - .HasColumnType("uuid"); - - b.Property("Status") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("ColorVarietyId"); - - b.HasIndex("EnclosureId"); - - b.HasIndex("LitterId"); - - b.HasIndex("OriginContactId"); - - b.HasIndex("ReceiverContactId"); - - b.ToTable("Gerbils"); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.GerbilPhoto", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Caption") - .HasColumnType("text"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("FileName") - .IsRequired() - .HasColumnType("text"); - - b.Property("GerbilId") - .HasColumnType("uuid"); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("GerbilId"); - - b.ToTable("GerbilPhotos"); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.HealthRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("Date") - .HasColumnType("date"); - - b.Property("Description") - .IsRequired() - .HasColumnType("text"); - - b.Property("GerbilId") - .HasColumnType("uuid"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text"); - - b.Property("Veterinarian") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("GerbilId"); - - b.ToTable("HealthRecords"); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.Litter", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Date") - .HasColumnType("date"); - - b.Property("ExpectedGoHomeDate") - .HasColumnType("date"); - - b.Property("FatherId") - .HasColumnType("uuid"); - - b.Property("MotherId") - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text"); - - b.Property("Notes") - .HasColumnType("text"); - - b.Property("TotalBorn") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("FatherId"); - - b.HasIndex("MotherId"); - - b.ToTable("Litters"); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.WeightRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Date") - .HasColumnType("date"); - - b.Property("GerbilId") - .HasColumnType("uuid"); - - b.Property("Notes") - .HasColumnType("text"); - - b.Property("WeightGrams") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("GerbilId"); - - b.ToTable("WeightRecords"); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.Gerbil", b => - { - b.HasOne("GerbilManagerWebAPI.Models.ColorVariety", "ColorVariety") - .WithMany() - .HasForeignKey("ColorVarietyId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("GerbilManagerWebAPI.Models.Enclosure", "Enclosure") - .WithMany("Gerbils") - .HasForeignKey("EnclosureId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("GerbilManagerWebAPI.Models.Litter", "Litter") - .WithMany() - .HasForeignKey("LitterId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("GerbilManagerWebAPI.Models.Contact", "OriginContact") - .WithMany() - .HasForeignKey("OriginContactId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("GerbilManagerWebAPI.Models.Contact", "ReceiverContact") - .WithMany() - .HasForeignKey("ReceiverContactId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("ColorVariety"); - - b.Navigation("Enclosure"); - - b.Navigation("Litter"); - - b.Navigation("OriginContact"); - - b.Navigation("ReceiverContact"); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.GerbilPhoto", b => - { - b.HasOne("GerbilManagerWebAPI.Models.Gerbil", null) - .WithMany() - .HasForeignKey("GerbilId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.HealthRecord", b => - { - b.HasOne("GerbilManagerWebAPI.Models.Gerbil", null) - .WithMany() - .HasForeignKey("GerbilId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.Litter", b => - { - b.HasOne("GerbilManagerWebAPI.Models.Gerbil", "Father") - .WithMany() - .HasForeignKey("FatherId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("GerbilManagerWebAPI.Models.Gerbil", "Mother") - .WithMany() - .HasForeignKey("MotherId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Father"); - - b.Navigation("Mother"); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.WeightRecord", b => - { - b.HasOne("GerbilManagerWebAPI.Models.Gerbil", null) - .WithMany() - .HasForeignKey("GerbilId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("GerbilManagerWebAPI.Models.Enclosure", b => - { - b.Navigation("Gerbils"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/GerbilManagerWebAPI/Migrations/20260605230614_InitialCreate.Designer.cs b/GerbilManagerWebAPI/Migrations/20260605230614_InitialCreate.Designer.cs new file mode 100644 index 0000000..79f73e6 --- /dev/null +++ b/GerbilManagerWebAPI/Migrations/20260605230614_InitialCreate.Designer.cs @@ -0,0 +1,891 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace GerbilManagerWebAPI.Migrations +{ + [DbContext(typeof(ApplicationContext))] + [Migration("20260605230614_InitialCreate")] + partial class InitialCreate + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.ColorVariety", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CanonicalGenotype") + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("SortOrder") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("ColorVarieties"); + + b.HasData( + new + { + Id = new Guid("00000000-0000-0000-0000-000000000001"), + CanonicalGenotype = "AA chch DD EE GG pp spsp rere", + Name = "Pink Eyed White (PEW)", + SortOrder = 0 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000002"), + CanonicalGenotype = "aa chch DD EE GG PP spsp rere", + Name = "Hermelin", + SortOrder = 1 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000003"), + CanonicalGenotype = "AA chch DD EE GG PP spsp rere", + Name = "Himalaya", + SortOrder = 2 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000004"), + CanonicalGenotype = "aa cchmcchm DD EE gg PP spsp rere", + Name = "Zobel", + SortOrder = 3 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000005"), + CanonicalGenotype = "AA CC DD efef GG PP spsp rere", + Name = "Schwarzschimmel", + SortOrder = 4 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000006"), + CanonicalGenotype = "AA CC DD efef GG pp spsp rere", + Name = "Rotaugenschimmel", + SortOrder = 5 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000007"), + CanonicalGenotype = "AA CC DD EE GG PP spsp rere", + Name = "Agouti", + SortOrder = 6 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000008"), + CanonicalGenotype = "aa CC DD EE GG PP spsp rere", + Name = "Schwarz", + SortOrder = 7 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000009"), + CanonicalGenotype = "AA CC DD EE gg PP spsp rere", + Name = "Silberagouti", + SortOrder = 8 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000010"), + CanonicalGenotype = "aa CC DD EE gg PP spsp rere", + Name = "Anthrazit", + SortOrder = 9 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000011"), + CanonicalGenotype = "AA CC DD ee GG PP spsp rere", + Name = "Algierfuchs", + SortOrder = 10 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000012"), + CanonicalGenotype = "aa CC dd EE GG PP spsp rere", + Name = "Blau", + SortOrder = 11 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000013"), + CanonicalGenotype = "AA CC DD EE GG pp spsp rere", + Name = "Gold", + SortOrder = 12 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000014"), + CanonicalGenotype = "aa CC DD EE GG pp spsp rere", + Name = "Platin", + SortOrder = 13 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000015"), + CanonicalGenotype = "AA CC DD ee GG pp spsp rere", + Name = "Goldfuchs", + SortOrder = 14 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000016"), + CanonicalGenotype = "aa CC DD ee GG pp spsp rere", + Name = "Rotfuchs", + SortOrder = 15 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000017"), + CanonicalGenotype = "AA CC dd EE GG pp spsp rere", + Name = "dd Gold", + SortOrder = 16 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000018"), + CanonicalGenotype = "aa CC dd EE GG pp spsp rere", + Name = "dd Platin", + SortOrder = 17 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000019"), + CanonicalGenotype = "aa CC DD EE gg pp spsp rere", + Name = "Altweiss (REW)", + SortOrder = 18 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000020"), + CanonicalGenotype = "AA CC DD ee gg pp spsp rere", + Name = "Apricot (Blassfuchs)", + SortOrder = 19 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000021"), + CanonicalGenotype = "aa CC DD ee gg PP spsp rere", + Name = "Blaufuchs", + SortOrder = 20 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000022"), + CanonicalGenotype = "aa CC DD ee gg pp spsp rere", + Name = "C-Separator", + SortOrder = 21 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000023"), + CanonicalGenotype = "AA CC DD EE gg pp spsp rere", + Name = "Elfenbein", + SortOrder = 22 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000024"), + CanonicalGenotype = "aa CC DD ee GG PP spsp rere", + Name = "Kohlfuchs", + SortOrder = 23 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000025"), + CanonicalGenotype = "aa cchmcchm DD EE GG PP spsp rere", + Name = "Marder", + SortOrder = 24 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000026"), + CanonicalGenotype = "aa cchmcchm DD EE GG PP spsp rere", + Name = "Siam (Marder-Hell)", + SortOrder = 25 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000027"), + CanonicalGenotype = "AA CC DD ee gg PP spsp rere", + Name = "Polarfuchs", + SortOrder = 26 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000028"), + CanonicalGenotype = "aa CC DD EE GG pp spsp rere", + Name = "Saphir", + SortOrder = 27 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000029"), + CanonicalGenotype = "AA CC DD efef GG PP spsp rere", + Name = "Schimmel (Orangeschimmel)", + SortOrder = 28 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000030"), + CanonicalGenotype = "AA CC DD EE GG pp spsp rere", + Name = "Topas", + SortOrder = 29 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000031"), + CanonicalGenotype = "aa CC DD EE GG pp spsp rere", + Name = "Platin-Hell", + SortOrder = 30 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000032"), + CanonicalGenotype = "AA CC dd EE GG PP spsp rere", + Name = "Agouti dd", + SortOrder = 31 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000033"), + CanonicalGenotype = "AA CC dd EE gg PP spsp rere", + Name = "Silberagouti dd", + SortOrder = 32 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000034"), + CanonicalGenotype = "aa CC dd ee GG PP spsp rere", + Name = "Kohlfuchs dd", + SortOrder = 33 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000035"), + CanonicalGenotype = "aa CC dd EE gg PP spsp rere", + Name = "Anthrazit dd", + SortOrder = 34 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000036"), + CanonicalGenotype = "AA cchmcchm DD EE GG PP spsp rere", + Name = "Agouti CP-Hell", + SortOrder = 35 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000037"), + CanonicalGenotype = "aa cchmcchm DD ee gg PP spsp rere", + Name = "Blaufuchs CP", + SortOrder = 36 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000038"), + CanonicalGenotype = "AA CC DD efef gg PP spsp rere", + Name = "Polarfuchsschimmel", + SortOrder = 37 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000039"), + CanonicalGenotype = "AA CC DD efef gg PP spsp rere", + Name = "Silberschimmel", + SortOrder = 38 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000040"), + CanonicalGenotype = "AA CC DD efef GG PP spsp rere", + Name = "Algierfuchsschimmel", + SortOrder = 39 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000041"), + CanonicalGenotype = "AA cchmcchm DD ee gg PP spsp rere", + Name = "Polarfuchs-Hell CP", + SortOrder = 40 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000042"), + CanonicalGenotype = "aa CC DD efef GG PP spsp rere", + Name = "Kohlfuchsschimmel", + SortOrder = 41 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000043"), + CanonicalGenotype = "aa CC DD efef gg PP spsp rere", + Name = "Blaufuchsschimmel", + SortOrder = 42 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000044"), + CanonicalGenotype = "aa CC DD ee GG PP spsp rere", + Name = "Kohlfuchs, hell", + SortOrder = 43 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000045"), + CanonicalGenotype = "AA CC DD ee GG pp spsp rere", + Name = "Goldfuchs, hell", + SortOrder = 44 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000046"), + CanonicalGenotype = "AA CC DD efef GG pp spsp rere", + Name = "Goldfuchsschimmel", + SortOrder = 45 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000047"), + CanonicalGenotype = "AA CC DD EE GG pp spsp rere", + Name = "Gold-Hell", + SortOrder = 46 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000048"), + CanonicalGenotype = "aa cchmcchm dd EE GG PP spsp rere", + Name = "Siam (Marder-Hell) dd", + SortOrder = 47 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000049"), + CanonicalGenotype = "aa cchmcchm dd EE GG PP spsp rere", + Name = "Marder dd", + SortOrder = 48 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000050"), + CanonicalGenotype = "aa cchmcchm DD EE gg PP spsp rere", + Name = "Zobel-Hell", + SortOrder = 49 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000051"), + CanonicalGenotype = "AA cchmcchm dd EE gg PP spsp rere", + Name = "Silberagouti dd CP", + SortOrder = 50 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000052"), + CanonicalGenotype = "AA cchmcchm dd EE gg PP spsp rere", + Name = "Silberagouti-Hell dd CP", + SortOrder = 51 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000053"), + CanonicalGenotype = "AA cchmcchm dd EE GG PP spsp rere", + Name = "Agouti dd CP", + SortOrder = 52 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000054"), + CanonicalGenotype = "AA cchmcchm dd EE GG PP spsp rere", + Name = "Agouti-Hell dd CP", + SortOrder = 53 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000055"), + CanonicalGenotype = "aa CC DD ee gg PP spsp rere", + Name = "Blaufuchs, hell", + SortOrder = 54 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000056"), + CanonicalGenotype = "aa CC DD efef GG pp spsp rere", + Name = "Rotfuchsschimmel", + SortOrder = 55 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000057"), + CanonicalGenotype = "AA CC DD ee gg PP spsp rere", + Name = "Polarfuchs, hell", + SortOrder = 56 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000058"), + CanonicalGenotype = "aa CC DD efef GG PP spsp rere", + Name = "Kohlfuchsschimmel, hell", + SortOrder = 57 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000059"), + CanonicalGenotype = "aa CC DD ee GG pp spsp rere", + Name = "Rotfuchs, hell", + SortOrder = 58 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000060"), + CanonicalGenotype = "aa cchmcchm dd EE gg PP spsp rere", + Name = "Zobel dd", + SortOrder = 59 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000061"), + CanonicalGenotype = "aa CC DD ee GG PP spsp rere", + Name = "Kohlfuchs-Hell", + SortOrder = 60 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000062"), + CanonicalGenotype = "aa cchmcchm DD ee GG PP spsp rere", + Name = "Kohlfuchs CP", + SortOrder = 61 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000063"), + CanonicalGenotype = "AA cchmcchm DD ee GG PP spsp rere", + Name = "Algierfuchs CP", + SortOrder = 62 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000064"), + CanonicalGenotype = "AA cchmcchm DD EE gg PP spsp rere", + Name = "Silberagouti CP", + SortOrder = 63 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000065"), + CanonicalGenotype = "AA cchmcchm DD EE GG PP spsp rere", + Name = "Agouti CP", + SortOrder = 64 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000066"), + CanonicalGenotype = "AA cchmcchm DD ee GG PP spsp rere", + Name = "Algierfuchs-Hell CP", + SortOrder = 65 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000067"), + CanonicalGenotype = "aa cchmcchm DD ee GG PP spsp rere", + Name = "Kohlfuchs,hell CP", + SortOrder = 66 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000068"), + CanonicalGenotype = "AA cchmcchm DD ee gg PP spsp rere", + Name = "Polarfuchs CP", + SortOrder = 67 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000069"), + CanonicalGenotype = "AA CC DD ee GG PP spsp rere", + Name = "Algierfuchs, hell", + SortOrder = 68 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000070"), + CanonicalGenotype = "AA CC dd EE GG pp spsp rere", + Name = "Topas dd", + SortOrder = 69 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000071"), + CanonicalGenotype = "aa cchmcchm dd EE gg PP spsp rere", + Name = "Zobel-Hell dd", + SortOrder = 70 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000072"), + CanonicalGenotype = "aa cchmcchm DD efef GG PP spsp rere", + Name = "Kohlfuchsschimmel CP", + SortOrder = 71 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000073"), + CanonicalGenotype = "aa CC dd ee gg PP spsp rere", + Name = "Blaufuchs dd", + SortOrder = 72 + }); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.Contact", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Address") + .HasColumnType("text"); + + b.Property("Email") + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Notes") + .HasColumnType("text"); + + b.Property("Phone") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Contacts"); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.Enclosure", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Notes") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Enclosures"); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.Gerbil", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CauseOfDeath") + .HasColumnType("text"); + + b.Property("ColorVarietyId") + .HasColumnType("uuid"); + + b.Property("DateOfBirth") + .HasColumnType("date"); + + b.Property("DateOfDeath") + .HasColumnType("date"); + + b.Property("EnclosureId") + .HasColumnType("uuid"); + + b.Property("ExternalRef") + .HasColumnType("text"); + + b.Property("Gender") + .IsRequired() + .HasColumnType("text"); + + b.Property("Genotype") + .HasColumnType("text"); + + b.Property("GoHomeDate") + .HasColumnType("date"); + + b.Property("ImportSource") + .HasColumnType("text"); + + b.Property("LitterId") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Notes") + .HasColumnType("text"); + + b.Property("OriginContactId") + .HasColumnType("uuid"); + + b.Property("ReceiverContactId") + .HasColumnType("uuid"); + + b.Property("Status") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ColorVarietyId"); + + b.HasIndex("EnclosureId"); + + b.HasIndex("LitterId"); + + b.HasIndex("OriginContactId"); + + b.HasIndex("ReceiverContactId"); + + b.ToTable("Gerbils"); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.GerbilPhoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Caption") + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("text"); + + b.Property("GerbilId") + .HasColumnType("uuid"); + + b.Property("SortOrder") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("GerbilId"); + + b.ToTable("GerbilPhotos"); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.HealthRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("GerbilId") + .HasColumnType("uuid"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text"); + + b.Property("Veterinarian") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("GerbilId"); + + b.ToTable("HealthRecords"); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.Litter", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("ExpectedGoHomeDate") + .HasColumnType("date"); + + b.Property("FatherId") + .HasColumnType("uuid"); + + b.Property("MotherId") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Notes") + .HasColumnType("text"); + + b.Property("TotalBorn") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("FatherId"); + + b.HasIndex("MotherId"); + + b.ToTable("Litters"); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.WeightRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("GerbilId") + .HasColumnType("uuid"); + + b.Property("Notes") + .HasColumnType("text"); + + b.Property("WeightGrams") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("GerbilId"); + + b.ToTable("WeightRecords"); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.Gerbil", b => + { + b.HasOne("GerbilManagerWebAPI.Models.ColorVariety", "ColorVariety") + .WithMany() + .HasForeignKey("ColorVarietyId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("GerbilManagerWebAPI.Models.Enclosure", "Enclosure") + .WithMany("Gerbils") + .HasForeignKey("EnclosureId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("GerbilManagerWebAPI.Models.Litter", "Litter") + .WithMany() + .HasForeignKey("LitterId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("GerbilManagerWebAPI.Models.Contact", "OriginContact") + .WithMany() + .HasForeignKey("OriginContactId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("GerbilManagerWebAPI.Models.Contact", "ReceiverContact") + .WithMany() + .HasForeignKey("ReceiverContactId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("ColorVariety"); + + b.Navigation("Enclosure"); + + b.Navigation("Litter"); + + b.Navigation("OriginContact"); + + b.Navigation("ReceiverContact"); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.GerbilPhoto", b => + { + b.HasOne("GerbilManagerWebAPI.Models.Gerbil", null) + .WithMany() + .HasForeignKey("GerbilId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.HealthRecord", b => + { + b.HasOne("GerbilManagerWebAPI.Models.Gerbil", null) + .WithMany() + .HasForeignKey("GerbilId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.Litter", b => + { + b.HasOne("GerbilManagerWebAPI.Models.Gerbil", "Father") + .WithMany() + .HasForeignKey("FatherId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("GerbilManagerWebAPI.Models.Gerbil", "Mother") + .WithMany() + .HasForeignKey("MotherId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Father"); + + b.Navigation("Mother"); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.WeightRecord", b => + { + b.HasOne("GerbilManagerWebAPI.Models.Gerbil", null) + .WithMany() + .HasForeignKey("GerbilId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("GerbilManagerWebAPI.Models.Enclosure", b => + { + b.Navigation("Gerbils"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/GerbilManagerWebAPI/Migrations/20260605225413_InitialCreate.cs b/GerbilManagerWebAPI/Migrations/20260605230614_InitialCreate.cs similarity index 66% rename from GerbilManagerWebAPI/Migrations/20260605225413_InitialCreate.cs rename to GerbilManagerWebAPI/Migrations/20260605230614_InitialCreate.cs index 80765c4..548c26a 100644 --- a/GerbilManagerWebAPI/Migrations/20260605225413_InitialCreate.cs +++ b/GerbilManagerWebAPI/Migrations/20260605230614_InitialCreate.cs @@ -33,7 +33,9 @@ namespace GerbilManagerWebAPI.Migrations { Id = table.Column(type: "uuid", nullable: false), Name = table.Column(type: "text", nullable: false), - ContactInfo = table.Column(type: "text", nullable: true), + Email = table.Column(type: "text", nullable: true), + Phone = table.Column(type: "text", nullable: true), + Address = table.Column(type: "text", nullable: true), Notes = table.Column(type: "text", nullable: true) }, constraints: table => @@ -217,7 +219,62 @@ namespace GerbilManagerWebAPI.Migrations { new Guid("00000000-0000-0000-0000-000000000015"), "AA CC DD ee GG pp spsp rere", "Goldfuchs", 14 }, { new Guid("00000000-0000-0000-0000-000000000016"), "aa CC DD ee GG pp spsp rere", "Rotfuchs", 15 }, { new Guid("00000000-0000-0000-0000-000000000017"), "AA CC dd EE GG pp spsp rere", "dd Gold", 16 }, - { new Guid("00000000-0000-0000-0000-000000000018"), "aa CC dd EE GG pp spsp rere", "dd Platin", 17 } + { new Guid("00000000-0000-0000-0000-000000000018"), "aa CC dd EE GG pp spsp rere", "dd Platin", 17 }, + { new Guid("00000000-0000-0000-0000-000000000019"), "aa CC DD EE gg pp spsp rere", "Altweiss (REW)", 18 }, + { new Guid("00000000-0000-0000-0000-000000000020"), "AA CC DD ee gg pp spsp rere", "Apricot (Blassfuchs)", 19 }, + { new Guid("00000000-0000-0000-0000-000000000021"), "aa CC DD ee gg PP spsp rere", "Blaufuchs", 20 }, + { new Guid("00000000-0000-0000-0000-000000000022"), "aa CC DD ee gg pp spsp rere", "C-Separator", 21 }, + { new Guid("00000000-0000-0000-0000-000000000023"), "AA CC DD EE gg pp spsp rere", "Elfenbein", 22 }, + { new Guid("00000000-0000-0000-0000-000000000024"), "aa CC DD ee GG PP spsp rere", "Kohlfuchs", 23 }, + { new Guid("00000000-0000-0000-0000-000000000025"), "aa cchmcchm DD EE GG PP spsp rere", "Marder", 24 }, + { new Guid("00000000-0000-0000-0000-000000000026"), "aa cchmcchm DD EE GG PP spsp rere", "Siam (Marder-Hell)", 25 }, + { new Guid("00000000-0000-0000-0000-000000000027"), "AA CC DD ee gg PP spsp rere", "Polarfuchs", 26 }, + { new Guid("00000000-0000-0000-0000-000000000028"), "aa CC DD EE GG pp spsp rere", "Saphir", 27 }, + { new Guid("00000000-0000-0000-0000-000000000029"), "AA CC DD efef GG PP spsp rere", "Schimmel (Orangeschimmel)", 28 }, + { new Guid("00000000-0000-0000-0000-000000000030"), "AA CC DD EE GG pp spsp rere", "Topas", 29 }, + { new Guid("00000000-0000-0000-0000-000000000031"), "aa CC DD EE GG pp spsp rere", "Platin-Hell", 30 }, + { new Guid("00000000-0000-0000-0000-000000000032"), "AA CC dd EE GG PP spsp rere", "Agouti dd", 31 }, + { new Guid("00000000-0000-0000-0000-000000000033"), "AA CC dd EE gg PP spsp rere", "Silberagouti dd", 32 }, + { new Guid("00000000-0000-0000-0000-000000000034"), "aa CC dd ee GG PP spsp rere", "Kohlfuchs dd", 33 }, + { new Guid("00000000-0000-0000-0000-000000000035"), "aa CC dd EE gg PP spsp rere", "Anthrazit dd", 34 }, + { new Guid("00000000-0000-0000-0000-000000000036"), "AA cchmcchm DD EE GG PP spsp rere", "Agouti CP-Hell", 35 }, + { new Guid("00000000-0000-0000-0000-000000000037"), "aa cchmcchm DD ee gg PP spsp rere", "Blaufuchs CP", 36 }, + { new Guid("00000000-0000-0000-0000-000000000038"), "AA CC DD efef gg PP spsp rere", "Polarfuchsschimmel", 37 }, + { new Guid("00000000-0000-0000-0000-000000000039"), "AA CC DD efef gg PP spsp rere", "Silberschimmel", 38 }, + { new Guid("00000000-0000-0000-0000-000000000040"), "AA CC DD efef GG PP spsp rere", "Algierfuchsschimmel", 39 }, + { new Guid("00000000-0000-0000-0000-000000000041"), "AA cchmcchm DD ee gg PP spsp rere", "Polarfuchs-Hell CP", 40 }, + { new Guid("00000000-0000-0000-0000-000000000042"), "aa CC DD efef GG PP spsp rere", "Kohlfuchsschimmel", 41 }, + { new Guid("00000000-0000-0000-0000-000000000043"), "aa CC DD efef gg PP spsp rere", "Blaufuchsschimmel", 42 }, + { new Guid("00000000-0000-0000-0000-000000000044"), "aa CC DD ee GG PP spsp rere", "Kohlfuchs, hell", 43 }, + { new Guid("00000000-0000-0000-0000-000000000045"), "AA CC DD ee GG pp spsp rere", "Goldfuchs, hell", 44 }, + { new Guid("00000000-0000-0000-0000-000000000046"), "AA CC DD efef GG pp spsp rere", "Goldfuchsschimmel", 45 }, + { new Guid("00000000-0000-0000-0000-000000000047"), "AA CC DD EE GG pp spsp rere", "Gold-Hell", 46 }, + { new Guid("00000000-0000-0000-0000-000000000048"), "aa cchmcchm dd EE GG PP spsp rere", "Siam (Marder-Hell) dd", 47 }, + { new Guid("00000000-0000-0000-0000-000000000049"), "aa cchmcchm dd EE GG PP spsp rere", "Marder dd", 48 }, + { new Guid("00000000-0000-0000-0000-000000000050"), "aa cchmcchm DD EE gg PP spsp rere", "Zobel-Hell", 49 }, + { new Guid("00000000-0000-0000-0000-000000000051"), "AA cchmcchm dd EE gg PP spsp rere", "Silberagouti dd CP", 50 }, + { new Guid("00000000-0000-0000-0000-000000000052"), "AA cchmcchm dd EE gg PP spsp rere", "Silberagouti-Hell dd CP", 51 }, + { new Guid("00000000-0000-0000-0000-000000000053"), "AA cchmcchm dd EE GG PP spsp rere", "Agouti dd CP", 52 }, + { new Guid("00000000-0000-0000-0000-000000000054"), "AA cchmcchm dd EE GG PP spsp rere", "Agouti-Hell dd CP", 53 }, + { new Guid("00000000-0000-0000-0000-000000000055"), "aa CC DD ee gg PP spsp rere", "Blaufuchs, hell", 54 }, + { new Guid("00000000-0000-0000-0000-000000000056"), "aa CC DD efef GG pp spsp rere", "Rotfuchsschimmel", 55 }, + { new Guid("00000000-0000-0000-0000-000000000057"), "AA CC DD ee gg PP spsp rere", "Polarfuchs, hell", 56 }, + { new Guid("00000000-0000-0000-0000-000000000058"), "aa CC DD efef GG PP spsp rere", "Kohlfuchsschimmel, hell", 57 }, + { new Guid("00000000-0000-0000-0000-000000000059"), "aa CC DD ee GG pp spsp rere", "Rotfuchs, hell", 58 }, + { new Guid("00000000-0000-0000-0000-000000000060"), "aa cchmcchm dd EE gg PP spsp rere", "Zobel dd", 59 }, + { new Guid("00000000-0000-0000-0000-000000000061"), "aa CC DD ee GG PP spsp rere", "Kohlfuchs-Hell", 60 }, + { new Guid("00000000-0000-0000-0000-000000000062"), "aa cchmcchm DD ee GG PP spsp rere", "Kohlfuchs CP", 61 }, + { new Guid("00000000-0000-0000-0000-000000000063"), "AA cchmcchm DD ee GG PP spsp rere", "Algierfuchs CP", 62 }, + { new Guid("00000000-0000-0000-0000-000000000064"), "AA cchmcchm DD EE gg PP spsp rere", "Silberagouti CP", 63 }, + { new Guid("00000000-0000-0000-0000-000000000065"), "AA cchmcchm DD EE GG PP spsp rere", "Agouti CP", 64 }, + { new Guid("00000000-0000-0000-0000-000000000066"), "AA cchmcchm DD ee GG PP spsp rere", "Algierfuchs-Hell CP", 65 }, + { new Guid("00000000-0000-0000-0000-000000000067"), "aa cchmcchm DD ee GG PP spsp rere", "Kohlfuchs,hell CP", 66 }, + { new Guid("00000000-0000-0000-0000-000000000068"), "AA cchmcchm DD ee gg PP spsp rere", "Polarfuchs CP", 67 }, + { new Guid("00000000-0000-0000-0000-000000000069"), "AA CC DD ee GG PP spsp rere", "Algierfuchs, hell", 68 }, + { new Guid("00000000-0000-0000-0000-000000000070"), "AA CC dd EE GG pp spsp rere", "Topas dd", 69 }, + { new Guid("00000000-0000-0000-0000-000000000071"), "aa cchmcchm dd EE gg PP spsp rere", "Zobel-Hell dd", 70 }, + { new Guid("00000000-0000-0000-0000-000000000072"), "aa cchmcchm DD efef GG PP spsp rere", "Kohlfuchsschimmel CP", 71 }, + { new Guid("00000000-0000-0000-0000-000000000073"), "aa CC dd ee gg PP spsp rere", "Blaufuchs dd", 72 } }); migrationBuilder.CreateIndex( diff --git a/GerbilManagerWebAPI/Migrations/ApplicationContextModelSnapshot.cs b/GerbilManagerWebAPI/Migrations/ApplicationContextModelSnapshot.cs index 74cf343..2116917 100644 --- a/GerbilManagerWebAPI/Migrations/ApplicationContextModelSnapshot.cs +++ b/GerbilManagerWebAPI/Migrations/ApplicationContextModelSnapshot.cs @@ -167,6 +167,391 @@ namespace GerbilManagerWebAPI.Migrations CanonicalGenotype = "aa CC dd EE GG pp spsp rere", Name = "dd Platin", SortOrder = 17 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000019"), + CanonicalGenotype = "aa CC DD EE gg pp spsp rere", + Name = "Altweiss (REW)", + SortOrder = 18 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000020"), + CanonicalGenotype = "AA CC DD ee gg pp spsp rere", + Name = "Apricot (Blassfuchs)", + SortOrder = 19 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000021"), + CanonicalGenotype = "aa CC DD ee gg PP spsp rere", + Name = "Blaufuchs", + SortOrder = 20 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000022"), + CanonicalGenotype = "aa CC DD ee gg pp spsp rere", + Name = "C-Separator", + SortOrder = 21 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000023"), + CanonicalGenotype = "AA CC DD EE gg pp spsp rere", + Name = "Elfenbein", + SortOrder = 22 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000024"), + CanonicalGenotype = "aa CC DD ee GG PP spsp rere", + Name = "Kohlfuchs", + SortOrder = 23 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000025"), + CanonicalGenotype = "aa cchmcchm DD EE GG PP spsp rere", + Name = "Marder", + SortOrder = 24 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000026"), + CanonicalGenotype = "aa cchmcchm DD EE GG PP spsp rere", + Name = "Siam (Marder-Hell)", + SortOrder = 25 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000027"), + CanonicalGenotype = "AA CC DD ee gg PP spsp rere", + Name = "Polarfuchs", + SortOrder = 26 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000028"), + CanonicalGenotype = "aa CC DD EE GG pp spsp rere", + Name = "Saphir", + SortOrder = 27 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000029"), + CanonicalGenotype = "AA CC DD efef GG PP spsp rere", + Name = "Schimmel (Orangeschimmel)", + SortOrder = 28 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000030"), + CanonicalGenotype = "AA CC DD EE GG pp spsp rere", + Name = "Topas", + SortOrder = 29 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000031"), + CanonicalGenotype = "aa CC DD EE GG pp spsp rere", + Name = "Platin-Hell", + SortOrder = 30 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000032"), + CanonicalGenotype = "AA CC dd EE GG PP spsp rere", + Name = "Agouti dd", + SortOrder = 31 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000033"), + CanonicalGenotype = "AA CC dd EE gg PP spsp rere", + Name = "Silberagouti dd", + SortOrder = 32 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000034"), + CanonicalGenotype = "aa CC dd ee GG PP spsp rere", + Name = "Kohlfuchs dd", + SortOrder = 33 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000035"), + CanonicalGenotype = "aa CC dd EE gg PP spsp rere", + Name = "Anthrazit dd", + SortOrder = 34 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000036"), + CanonicalGenotype = "AA cchmcchm DD EE GG PP spsp rere", + Name = "Agouti CP-Hell", + SortOrder = 35 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000037"), + CanonicalGenotype = "aa cchmcchm DD ee gg PP spsp rere", + Name = "Blaufuchs CP", + SortOrder = 36 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000038"), + CanonicalGenotype = "AA CC DD efef gg PP spsp rere", + Name = "Polarfuchsschimmel", + SortOrder = 37 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000039"), + CanonicalGenotype = "AA CC DD efef gg PP spsp rere", + Name = "Silberschimmel", + SortOrder = 38 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000040"), + CanonicalGenotype = "AA CC DD efef GG PP spsp rere", + Name = "Algierfuchsschimmel", + SortOrder = 39 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000041"), + CanonicalGenotype = "AA cchmcchm DD ee gg PP spsp rere", + Name = "Polarfuchs-Hell CP", + SortOrder = 40 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000042"), + CanonicalGenotype = "aa CC DD efef GG PP spsp rere", + Name = "Kohlfuchsschimmel", + SortOrder = 41 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000043"), + CanonicalGenotype = "aa CC DD efef gg PP spsp rere", + Name = "Blaufuchsschimmel", + SortOrder = 42 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000044"), + CanonicalGenotype = "aa CC DD ee GG PP spsp rere", + Name = "Kohlfuchs, hell", + SortOrder = 43 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000045"), + CanonicalGenotype = "AA CC DD ee GG pp spsp rere", + Name = "Goldfuchs, hell", + SortOrder = 44 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000046"), + CanonicalGenotype = "AA CC DD efef GG pp spsp rere", + Name = "Goldfuchsschimmel", + SortOrder = 45 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000047"), + CanonicalGenotype = "AA CC DD EE GG pp spsp rere", + Name = "Gold-Hell", + SortOrder = 46 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000048"), + CanonicalGenotype = "aa cchmcchm dd EE GG PP spsp rere", + Name = "Siam (Marder-Hell) dd", + SortOrder = 47 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000049"), + CanonicalGenotype = "aa cchmcchm dd EE GG PP spsp rere", + Name = "Marder dd", + SortOrder = 48 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000050"), + CanonicalGenotype = "aa cchmcchm DD EE gg PP spsp rere", + Name = "Zobel-Hell", + SortOrder = 49 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000051"), + CanonicalGenotype = "AA cchmcchm dd EE gg PP spsp rere", + Name = "Silberagouti dd CP", + SortOrder = 50 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000052"), + CanonicalGenotype = "AA cchmcchm dd EE gg PP spsp rere", + Name = "Silberagouti-Hell dd CP", + SortOrder = 51 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000053"), + CanonicalGenotype = "AA cchmcchm dd EE GG PP spsp rere", + Name = "Agouti dd CP", + SortOrder = 52 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000054"), + CanonicalGenotype = "AA cchmcchm dd EE GG PP spsp rere", + Name = "Agouti-Hell dd CP", + SortOrder = 53 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000055"), + CanonicalGenotype = "aa CC DD ee gg PP spsp rere", + Name = "Blaufuchs, hell", + SortOrder = 54 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000056"), + CanonicalGenotype = "aa CC DD efef GG pp spsp rere", + Name = "Rotfuchsschimmel", + SortOrder = 55 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000057"), + CanonicalGenotype = "AA CC DD ee gg PP spsp rere", + Name = "Polarfuchs, hell", + SortOrder = 56 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000058"), + CanonicalGenotype = "aa CC DD efef GG PP spsp rere", + Name = "Kohlfuchsschimmel, hell", + SortOrder = 57 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000059"), + CanonicalGenotype = "aa CC DD ee GG pp spsp rere", + Name = "Rotfuchs, hell", + SortOrder = 58 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000060"), + CanonicalGenotype = "aa cchmcchm dd EE gg PP spsp rere", + Name = "Zobel dd", + SortOrder = 59 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000061"), + CanonicalGenotype = "aa CC DD ee GG PP spsp rere", + Name = "Kohlfuchs-Hell", + SortOrder = 60 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000062"), + CanonicalGenotype = "aa cchmcchm DD ee GG PP spsp rere", + Name = "Kohlfuchs CP", + SortOrder = 61 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000063"), + CanonicalGenotype = "AA cchmcchm DD ee GG PP spsp rere", + Name = "Algierfuchs CP", + SortOrder = 62 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000064"), + CanonicalGenotype = "AA cchmcchm DD EE gg PP spsp rere", + Name = "Silberagouti CP", + SortOrder = 63 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000065"), + CanonicalGenotype = "AA cchmcchm DD EE GG PP spsp rere", + Name = "Agouti CP", + SortOrder = 64 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000066"), + CanonicalGenotype = "AA cchmcchm DD ee GG PP spsp rere", + Name = "Algierfuchs-Hell CP", + SortOrder = 65 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000067"), + CanonicalGenotype = "aa cchmcchm DD ee GG PP spsp rere", + Name = "Kohlfuchs,hell CP", + SortOrder = 66 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000068"), + CanonicalGenotype = "AA cchmcchm DD ee gg PP spsp rere", + Name = "Polarfuchs CP", + SortOrder = 67 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000069"), + CanonicalGenotype = "AA CC DD ee GG PP spsp rere", + Name = "Algierfuchs, hell", + SortOrder = 68 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000070"), + CanonicalGenotype = "AA CC dd EE GG pp spsp rere", + Name = "Topas dd", + SortOrder = 69 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000071"), + CanonicalGenotype = "aa cchmcchm dd EE gg PP spsp rere", + Name = "Zobel-Hell dd", + SortOrder = 70 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000072"), + CanonicalGenotype = "aa cchmcchm DD efef GG PP spsp rere", + Name = "Kohlfuchsschimmel CP", + SortOrder = 71 + }, + new + { + Id = new Guid("00000000-0000-0000-0000-000000000073"), + CanonicalGenotype = "aa CC dd ee gg PP spsp rere", + Name = "Blaufuchs dd", + SortOrder = 72 }); }); @@ -176,7 +561,10 @@ namespace GerbilManagerWebAPI.Migrations .ValueGeneratedOnAdd() .HasColumnType("uuid"); - b.Property("ContactInfo") + b.Property("Address") + .HasColumnType("text"); + + b.Property("Email") .HasColumnType("text"); b.Property("Name") @@ -186,6 +574,9 @@ namespace GerbilManagerWebAPI.Migrations b.Property("Notes") .HasColumnType("text"); + b.Property("Phone") + .HasColumnType("text"); + b.HasKey("Id"); b.ToTable("Contacts"); diff --git a/GerbilManagerWebAPI/Models/Contact.cs b/GerbilManagerWebAPI/Models/Contact.cs index bee831f..68c38e2 100644 --- a/GerbilManagerWebAPI/Models/Contact.cs +++ b/GerbilManagerWebAPI/Models/Contact.cs @@ -11,7 +11,9 @@ namespace GerbilManagerWebAPI.Models [Key] public Guid Id { get; set; } public required string Name { get; set; } - public string? ContactInfo { get; set; } + public string? Email { get; set; } + public string? Phone { get; set; } + public string? Address { get; set; } public string? Notes { get; set; } } } diff --git a/GerbilManagerWebAPI/Models/GerbilStatus.cs b/GerbilManagerWebAPI/Models/GerbilStatus.cs index df7df7a..0d17d3e 100644 --- a/GerbilManagerWebAPI/Models/GerbilStatus.cs +++ b/GerbilManagerWebAPI/Models/GerbilStatus.cs @@ -5,6 +5,8 @@ namespace GerbilManagerWebAPI.Models { Active = 0, Deceased = 1, - GivenAway = 2 + GivenAway = 2, + /// Alive, at home, offered for Abgabe ("Abzugeben"). Drives FEAT-12 sale listing. + ForSale = 3 } }