128 lines
4.2 KiB
C#
128 lines
4.2 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace GerbilManagerWebAPI.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationContext))]
|
|
partial class ApplicationContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "7.0.12")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("GerbilManagerWebAPI.Models.Breeder", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Breeders");
|
|
});
|
|
|
|
modelBuilder.Entity("GerbilManagerWebAPI.Models.Gerbil", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("BreederId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<int>("Gender")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid?>("LitterId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("BreederId");
|
|
|
|
b.HasIndex("LitterId");
|
|
|
|
b.ToTable("Gerbils");
|
|
});
|
|
|
|
modelBuilder.Entity("GerbilManagerWebAPI.Models.Litter", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("Date")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("FatherId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("MotherId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("Strength")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("FatherId");
|
|
|
|
b.HasIndex("MotherId");
|
|
|
|
b.ToTable("Litters");
|
|
});
|
|
|
|
modelBuilder.Entity("GerbilManagerWebAPI.Models.Gerbil", b =>
|
|
{
|
|
b.HasOne("GerbilManagerWebAPI.Models.Breeder", "Breeder")
|
|
.WithMany()
|
|
.HasForeignKey("BreederId");
|
|
|
|
b.HasOne("GerbilManagerWebAPI.Models.Litter", "Litter")
|
|
.WithMany()
|
|
.HasForeignKey("LitterId");
|
|
|
|
b.Navigation("Breeder");
|
|
|
|
b.Navigation("Litter");
|
|
});
|
|
|
|
modelBuilder.Entity("GerbilManagerWebAPI.Models.Litter", b =>
|
|
{
|
|
b.HasOne("GerbilManagerWebAPI.Models.Gerbil", "Father")
|
|
.WithMany()
|
|
.HasForeignKey("FatherId");
|
|
|
|
b.HasOne("GerbilManagerWebAPI.Models.Gerbil", "Mother")
|
|
.WithMany()
|
|
.HasForeignKey("MotherId");
|
|
|
|
b.Navigation("Father");
|
|
|
|
b.Navigation("Mother");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|