This repository has been archived on 2025-08-13. You can view files and clone it, but cannot push or open issues or pull requests.
Files
KTUSA-PS/KTUSAPS.Data/Migrations/20211015122630_Initial.Designer.cs
Karolis Kundrotas aff6f8df82 Huge work
2021-10-25 22:00:01 +03:00

265 lines
8.6 KiB
C#

// <auto-generated />
using System;
using KTUSAPS.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace KTUSAPS.Data.Migrations
{
[DbContext(typeof(SAPSDataContext))]
[Migration("20211015122630_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Relational:MaxIdentifierLength", 64)
.HasAnnotation("ProductVersion", "5.0.9");
modelBuilder.Entity("KTUSAPS.Data.Model.Admin", b =>
{
b.Property<string>("UserId")
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property<string>("Comment")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.HasKey("UserId");
b.ToTable("Admins");
});
modelBuilder.Entity("KTUSAPS.Data.Model.Issue", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property<DateTime>("Created")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.HasColumnType("longtext");
b.Property<string>("Email")
.HasMaxLength(320)
.HasColumnType("varchar(320)");
b.Property<int>("IssueTypeId")
.HasColumnType("int");
b.Property<bool>("Publishable")
.HasColumnType("tinyint(1)");
b.Property<bool>("Solved")
.HasColumnType("tinyint(1)");
b.Property<string>("UserID")
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.HasKey("Id");
b.HasIndex("IssueTypeId");
b.ToTable("Issues");
});
modelBuilder.Entity("KTUSAPS.Data.Model.IssueType", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property<string>("Name")
.HasColumnType("longtext");
b.Property<string>("NameEn")
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("IssueTypes");
});
modelBuilder.Entity("KTUSAPS.Data.Model.PublishedFeedback", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property<DateTime>("Created")
.HasColumnType("datetime(6)");
b.Property<string>("FeedbackEn")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("FeedbackLt")
.IsRequired()
.HasColumnType("longtext");
b.Property<int?>("IssueId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("IssueId")
.IsUnique();
b.ToTable("PublishedFeedbacks");
});
modelBuilder.Entity("KTUSAPS.Data.Model.PublishedProblem", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property<DateTime>("Created")
.HasColumnType("datetime(6)");
b.Property<int?>("IssueId")
.HasColumnType("int");
b.Property<string>("ProblemEn")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("ProblemLt")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("ResponseEn")
.HasColumnType("longtext");
b.Property<string>("ResponseLt")
.HasColumnType("longtext");
b.Property<int?>("SolutionId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("IssueId")
.IsUnique();
b.HasIndex("SolutionId")
.IsUnique();
b.ToTable("PublishedProblems");
});
modelBuilder.Entity("KTUSAPS.Data.Model.Solution", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property<DateTime>("Created")
.HasColumnType("datetime(6)");
b.Property<string>("SolutionEn")
.HasColumnType("longtext");
b.Property<string>("SolutionLt")
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("Solutions");
});
modelBuilder.Entity("KTUSAPS.Data.Model.Vote", b =>
{
b.Property<string>("UserId")
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property<int>("ProblemId")
.HasColumnType("int");
b.HasKey("UserId", "ProblemId");
b.HasIndex("ProblemId");
b.ToTable("Votes");
});
modelBuilder.Entity("KTUSAPS.Data.Model.Issue", b =>
{
b.HasOne("KTUSAPS.Data.Model.IssueType", "IssueType")
.WithMany("Issues")
.HasForeignKey("IssueTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("IssueType");
});
modelBuilder.Entity("KTUSAPS.Data.Model.PublishedFeedback", b =>
{
b.HasOne("KTUSAPS.Data.Model.Issue", "Issue")
.WithOne("Feedback")
.HasForeignKey("KTUSAPS.Data.Model.PublishedFeedback", "IssueId");
b.Navigation("Issue");
});
modelBuilder.Entity("KTUSAPS.Data.Model.PublishedProblem", b =>
{
b.HasOne("KTUSAPS.Data.Model.Issue", "Issue")
.WithOne("Problem")
.HasForeignKey("KTUSAPS.Data.Model.PublishedProblem", "IssueId");
b.HasOne("KTUSAPS.Data.Model.Solution", "Solution")
.WithOne("Problem")
.HasForeignKey("KTUSAPS.Data.Model.PublishedProblem", "SolutionId");
b.Navigation("Issue");
b.Navigation("Solution");
});
modelBuilder.Entity("KTUSAPS.Data.Model.Vote", b =>
{
b.HasOne("KTUSAPS.Data.Model.PublishedProblem", "Problem")
.WithMany("Votes")
.HasForeignKey("ProblemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Problem");
});
modelBuilder.Entity("KTUSAPS.Data.Model.Issue", b =>
{
b.Navigation("Feedback");
b.Navigation("Problem");
});
modelBuilder.Entity("KTUSAPS.Data.Model.IssueType", b =>
{
b.Navigation("Issues");
});
modelBuilder.Entity("KTUSAPS.Data.Model.PublishedProblem", b =>
{
b.Navigation("Votes");
});
modelBuilder.Entity("KTUSAPS.Data.Model.Solution", b =>
{
b.Navigation("Problem");
});
#pragma warning restore 612, 618
}
}
}