SUBD-Petrushin-Egor-PIbd-22/TaskTrackerDatabase/Migrations/TaskTrackerDatabaseModelSnapshot.cs
2024-05-13 14:29:34 +04:00

208 lines
6.9 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using TaskTrackerDatabase;
#nullable disable
namespace TaskTrackerDatabase.Migrations
{
[DbContext(typeof(TaskTrackerDatabase))]
partial class TaskTrackerDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.16")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("TaskTrackerDatabase.Models.Organization", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("OrganizationName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Organizations");
});
modelBuilder.Entity("TaskTrackerDatabase.Models.OrganizationProject", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("NumberEmployees")
.HasColumnType("int");
b.Property<int>("OrganizationId")
.HasColumnType("int");
b.Property<int>("ProjectId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("OrganizationId");
b.HasIndex("ProjectId");
b.ToTable("OrganizationProjects");
});
modelBuilder.Entity("TaskTrackerDatabase.Models.Project", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ProjectName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Projects");
});
modelBuilder.Entity("TaskTrackerDatabase.Models.Task", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateImplement")
.HasColumnType("datetime2");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("ProjectId")
.HasColumnType("int");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("UserId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ProjectId");
b.HasIndex("UserId");
b.ToTable("Tasks");
});
modelBuilder.Entity("TaskTrackerDatabase.Models.User", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("UserFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("TaskTrackerDatabase.Models.OrganizationProject", b =>
{
b.HasOne("TaskTrackerDatabase.Models.Organization", "Organization")
.WithMany("Projects")
.HasForeignKey("OrganizationId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TaskTrackerDatabase.Models.Project", "Project")
.WithMany("OrganizationProjects")
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Organization");
b.Navigation("Project");
});
modelBuilder.Entity("TaskTrackerDatabase.Models.Task", b =>
{
b.HasOne("TaskTrackerDatabase.Models.Project", "Project")
.WithMany("Tasks")
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("TaskTrackerDatabase.Models.User", "User")
.WithMany("Tasks")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Project");
b.Navigation("User");
});
modelBuilder.Entity("TaskTrackerDatabase.Models.Organization", b =>
{
b.Navigation("Projects");
});
modelBuilder.Entity("TaskTrackerDatabase.Models.Project", b =>
{
b.Navigation("OrganizationProjects");
b.Navigation("Tasks");
});
modelBuilder.Entity("TaskTrackerDatabase.Models.User", b =>
{
b.Navigation("Tasks");
});
#pragma warning restore 612, 618
}
}
}