ultimate/Ultimate/Migrations/20230912082832_DatabaseCreate.Designer.cs
Frede Hundewadt 6c13b606ef update
2023-12-11 14:05:07 +01:00

98 lines
3.1 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Repository;
#nullable disable
namespace Ultimate.Migrations
{
[DbContext(typeof(RepositoryContext))]
[Migration("20230912082832_DatabaseCreate")]
partial class DatabaseCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Entities.Company", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnName("CompanyId");
b.Property<string>("Address")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("varchar(60)");
b.Property<string>("Country")
.HasColumnType("longtext");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("varchar(60)");
b.HasKey("Id");
b.ToTable("Companies");
});
modelBuilder.Entity("Entities.Employee", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)")
.HasColumnName("EmployeeId");
b.Property<int>("Age")
.HasColumnType("int");
b.Property<Guid>("CompanyId")
.HasColumnType("char(36)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("varchar(30)");
b.Property<string>("Position")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.HasKey("Id");
b.HasIndex("CompanyId");
b.ToTable("Employees");
});
modelBuilder.Entity("Entities.Employee", b =>
{
b.HasOne("Entities.Company", "Company")
.WithMany("Employees")
.HasForeignKey("CompanyId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Company");
});
modelBuilder.Entity("Entities.Company", b =>
{
b.Navigation("Employees");
});
#pragma warning restore 612, 618
}
}
}