137 lines
5 KiB
C#
137 lines
5 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Repository;
|
|
|
|
#nullable disable
|
|
|
|
namespace Ultimate.Migrations
|
|
{
|
|
[DbContext(typeof(RepositoryContext))]
|
|
partial class RepositoryContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(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");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = new Guid("c9d4c053-49b6-410c-bc78-2d54a9991870"),
|
|
Address = "583 Wall Dr. Gwynn Oak, MD 21207",
|
|
Country = "USA",
|
|
Name = "IT_Solutions Ltd"
|
|
},
|
|
new
|
|
{
|
|
Id = new Guid("3d490a70-94ce-4d15-9494-5248280c2ce3"),
|
|
Address = "312 Forest Avenue, BF 923",
|
|
Country = "USA",
|
|
Name = "Admin_Solutions Ltd"
|
|
});
|
|
});
|
|
|
|
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");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = new Guid("80abbca8-664d-4b20-b5de-024705497d4a"),
|
|
Age = 26,
|
|
CompanyId = new Guid("c9d4c053-49b6-410c-bc78-2d54a9991870"),
|
|
Name = "Sam Raiden",
|
|
Position = "Software developer"
|
|
},
|
|
new
|
|
{
|
|
Id = new Guid("86dba8c0-d178-41e7-938c-ed49778fb52a"),
|
|
Age = 30,
|
|
CompanyId = new Guid("c9d4c053-49b6-410c-bc78-2d54a9991870"),
|
|
Name = "Jana McLeaf",
|
|
Position = "Software developer"
|
|
},
|
|
new
|
|
{
|
|
Id = new Guid("021ca3c1-0deb-4afd-ae94-2159a8479811"),
|
|
Age = 35,
|
|
CompanyId = new Guid("3d490a70-94ce-4d15-9494-5248280c2ce3"),
|
|
Name = "Kane Miller",
|
|
Position = "Administrator"
|
|
});
|
|
});
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|