From b447434a47524d4907722be89bdbe8322d1d1b8c Mon Sep 17 00:00:00 2001 From: Nadegamra <63640402+Nadegamra@users.noreply.github.com> Date: Thu, 9 Sep 2021 20:32:56 +0300 Subject: [PATCH] Database --- KTUSA PS/ClientApp/src/components/NavMenu.vue | 2 +- .../20210909173149_Initial.Designer.cs | 226 ++++++++++++++++++ .../Migrations/20210909173149_Initial.cs | 195 +++++++++++++++ .../SAPSDataContextModelSnapshot.cs | 224 +++++++++++++++++ KTUSAPS.Data/Model/Admin.cs | 17 ++ KTUSAPS.Data/Model/Issue.cs | 2 +- .../Model/{ClassDiagram1.cd => Models.cd} | 16 +- KTUSAPS.Data/SAPSDataContext.cs | 4 +- 8 files changed, 675 insertions(+), 11 deletions(-) create mode 100644 KTUSAPS.Data/Migrations/20210909173149_Initial.Designer.cs create mode 100644 KTUSAPS.Data/Migrations/20210909173149_Initial.cs create mode 100644 KTUSAPS.Data/Migrations/SAPSDataContextModelSnapshot.cs create mode 100644 KTUSAPS.Data/Model/Admin.cs rename KTUSAPS.Data/Model/{ClassDiagram1.cd => Models.cd} (85%) diff --git a/KTUSA PS/ClientApp/src/components/NavMenu.vue b/KTUSA PS/ClientApp/src/components/NavMenu.vue index afb8941..1bc7c0b 100644 --- a/KTUSA PS/ClientApp/src/components/NavMenu.vue +++ b/KTUSA PS/ClientApp/src/components/NavMenu.vue @@ -44,7 +44,7 @@ > Login diff --git a/KTUSAPS.Data/Migrations/20210909173149_Initial.Designer.cs b/KTUSAPS.Data/Migrations/20210909173149_Initial.Designer.cs new file mode 100644 index 0000000..d6aaba3 --- /dev/null +++ b/KTUSAPS.Data/Migrations/20210909173149_Initial.Designer.cs @@ -0,0 +1,226 @@ +// +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("20210909173149_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("UserId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Comment") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("UserId"); + + b.ToTable("Admins"); + }); + + modelBuilder.Entity("KTUSAPS.Data.Model.Issue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Email") + .HasMaxLength(320) + .HasColumnType("varchar(320)"); + + b.Property("Publishable") + .HasColumnType("tinyint(1)"); + + b.Property("Solved") + .HasColumnType("tinyint(1)"); + + b.Property("UserID") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.ToTable("Issues"); + }); + + modelBuilder.Entity("KTUSAPS.Data.Model.PublishedFeedback", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("FeedbackEn") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FeedbackLt") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IssueId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("IssueId") + .IsUnique(); + + b.ToTable("PublishedFeedbacks"); + }); + + modelBuilder.Entity("KTUSAPS.Data.Model.PublishedProblem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("IssueId") + .HasColumnType("int"); + + b.Property("ProblemEn") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ProblemLt") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ResponseEn") + .HasColumnType("longtext"); + + b.Property("ResponseLt") + .HasColumnType("longtext"); + + b.Property("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("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("SolutionEn") + .HasColumnType("longtext"); + + b.Property("SolutionLt") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.ToTable("Solutions"); + }); + + modelBuilder.Entity("KTUSAPS.Data.Model.Vote", b => + { + b.Property("UserId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProblemId") + .HasColumnType("int"); + + b.HasKey("UserId", "ProblemId"); + + b.HasIndex("ProblemId"); + + b.ToTable("Votes"); + }); + + 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.PublishedProblem", b => + { + b.Navigation("Votes"); + }); + + modelBuilder.Entity("KTUSAPS.Data.Model.Solution", b => + { + b.Navigation("Problem"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/KTUSAPS.Data/Migrations/20210909173149_Initial.cs b/KTUSAPS.Data/Migrations/20210909173149_Initial.cs new file mode 100644 index 0000000..fe350d6 --- /dev/null +++ b/KTUSAPS.Data/Migrations/20210909173149_Initial.cs @@ -0,0 +1,195 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace KTUSAPS.Data.Migrations +{ + public partial class Initial : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Admins", + columns: table => new + { + UserId = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Comment = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_Admins", x => x.UserId); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Issues", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + UserID = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Email = table.Column(type: "varchar(320)", maxLength: 320, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Publishable = table.Column(type: "tinyint(1)", nullable: false), + Solved = table.Column(type: "tinyint(1)", nullable: false), + Created = table.Column(type: "datetime(6)", nullable: false), + Description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_Issues", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Solutions", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + SolutionLt = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + SolutionEn = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Created = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Solutions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "PublishedFeedbacks", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + FeedbackLt = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FeedbackEn = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Created = table.Column(type: "datetime(6)", nullable: false), + IssueId = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_PublishedFeedbacks", x => x.Id); + table.ForeignKey( + name: "FK_PublishedFeedbacks_Issues_IssueId", + column: x => x.IssueId, + principalTable: "Issues", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "PublishedProblems", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ProblemLt = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProblemEn = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ResponseLt = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ResponseEn = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Created = table.Column(type: "datetime(6)", nullable: false), + IssueId = table.Column(type: "int", nullable: true), + SolutionId = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_PublishedProblems", x => x.Id); + table.ForeignKey( + name: "FK_PublishedProblems_Issues_IssueId", + column: x => x.IssueId, + principalTable: "Issues", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_PublishedProblems_Solutions_SolutionId", + column: x => x.SolutionId, + principalTable: "Solutions", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Votes", + columns: table => new + { + UserId = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProblemId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Votes", x => new { x.UserId, x.ProblemId }); + table.ForeignKey( + name: "FK_Votes_PublishedProblems_ProblemId", + column: x => x.ProblemId, + principalTable: "PublishedProblems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_PublishedFeedbacks_IssueId", + table: "PublishedFeedbacks", + column: "IssueId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_PublishedProblems_IssueId", + table: "PublishedProblems", + column: "IssueId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_PublishedProblems_SolutionId", + table: "PublishedProblems", + column: "SolutionId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Votes_ProblemId", + table: "Votes", + column: "ProblemId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Admins"); + + migrationBuilder.DropTable( + name: "PublishedFeedbacks"); + + migrationBuilder.DropTable( + name: "Votes"); + + migrationBuilder.DropTable( + name: "PublishedProblems"); + + migrationBuilder.DropTable( + name: "Issues"); + + migrationBuilder.DropTable( + name: "Solutions"); + } + } +} diff --git a/KTUSAPS.Data/Migrations/SAPSDataContextModelSnapshot.cs b/KTUSAPS.Data/Migrations/SAPSDataContextModelSnapshot.cs new file mode 100644 index 0000000..9ddd6c2 --- /dev/null +++ b/KTUSAPS.Data/Migrations/SAPSDataContextModelSnapshot.cs @@ -0,0 +1,224 @@ +// +using System; +using KTUSAPS.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace KTUSAPS.Data.Migrations +{ + [DbContext(typeof(SAPSDataContext))] + partial class SAPSDataContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(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("UserId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Comment") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("UserId"); + + b.ToTable("Admins"); + }); + + modelBuilder.Entity("KTUSAPS.Data.Model.Issue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Email") + .HasMaxLength(320) + .HasColumnType("varchar(320)"); + + b.Property("Publishable") + .HasColumnType("tinyint(1)"); + + b.Property("Solved") + .HasColumnType("tinyint(1)"); + + b.Property("UserID") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.ToTable("Issues"); + }); + + modelBuilder.Entity("KTUSAPS.Data.Model.PublishedFeedback", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("FeedbackEn") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FeedbackLt") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IssueId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("IssueId") + .IsUnique(); + + b.ToTable("PublishedFeedbacks"); + }); + + modelBuilder.Entity("KTUSAPS.Data.Model.PublishedProblem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("IssueId") + .HasColumnType("int"); + + b.Property("ProblemEn") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ProblemLt") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ResponseEn") + .HasColumnType("longtext"); + + b.Property("ResponseLt") + .HasColumnType("longtext"); + + b.Property("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("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("SolutionEn") + .HasColumnType("longtext"); + + b.Property("SolutionLt") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.ToTable("Solutions"); + }); + + modelBuilder.Entity("KTUSAPS.Data.Model.Vote", b => + { + b.Property("UserId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProblemId") + .HasColumnType("int"); + + b.HasKey("UserId", "ProblemId"); + + b.HasIndex("ProblemId"); + + b.ToTable("Votes"); + }); + + 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.PublishedProblem", b => + { + b.Navigation("Votes"); + }); + + modelBuilder.Entity("KTUSAPS.Data.Model.Solution", b => + { + b.Navigation("Problem"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/KTUSAPS.Data/Model/Admin.cs b/KTUSAPS.Data/Model/Admin.cs new file mode 100644 index 0000000..b501ae5 --- /dev/null +++ b/KTUSAPS.Data/Model/Admin.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KTUSAPS.Data.Model +{ + public class Admin + { + [Key, MaxLength(64)] + public string UserId { get; set; } + [MaxLength(256)] + public string Comment { get; set; } + } +} diff --git a/KTUSAPS.Data/Model/Issue.cs b/KTUSAPS.Data/Model/Issue.cs index 40dcaf0..91c6064 100644 --- a/KTUSAPS.Data/Model/Issue.cs +++ b/KTUSAPS.Data/Model/Issue.cs @@ -14,8 +14,8 @@ namespace KTUSAPS.Data.Model public int Id { get; set; } [MaxLength(64)] public string UserID { get; set; } + [MaxLength(320)] public string Email { get; set; } - public bool Anonimous { get; set; } public bool Publishable { get; set; } public bool Solved { get; set; } = false; public DateTime Created { get; set; } diff --git a/KTUSAPS.Data/Model/ClassDiagram1.cd b/KTUSAPS.Data/Model/Models.cd similarity index 85% rename from KTUSAPS.Data/Model/ClassDiagram1.cd rename to KTUSAPS.Data/Model/Models.cd index a860c23..0422b98 100644 --- a/KTUSAPS.Data/Model/ClassDiagram1.cd +++ b/KTUSAPS.Data/Model/Models.cd @@ -1,18 +1,18 @@  - + - AAACAAJAACAgAAAAAAACAAgIAAEAAAQAAAAAAAAAAAA= + AAACAAJAACAgAAAAAAACAAgIAAAAAAQAAAAAAAAAAAA= Model\Issue.cs - + - + AAECAAAAAAAAAAAACAIAAAAAAAAAAAQAEAAAAAAAAAA= Model\PublishedFeedback.cs @@ -22,21 +22,21 @@ - + ACECABAAAAEAAAgAAAABAAAAEAAAQAQAEAAAAAAAAAA= Model\PublishedProblem.cs - + - + AAACAAIABAAAAQAAAAAAAAAAAAAAAAQAAAAAAAAAAAA= Model\Solution.cs @@ -46,7 +46,7 @@ - + AAAAAAIAAAAAEAAAAAAAAAgAAAAAAAAAAAAAAAAAAAA= Model\Vote.cs diff --git a/KTUSAPS.Data/SAPSDataContext.cs b/KTUSAPS.Data/SAPSDataContext.cs index 083e8ff..e5fc284 100644 --- a/KTUSAPS.Data/SAPSDataContext.cs +++ b/KTUSAPS.Data/SAPSDataContext.cs @@ -22,7 +22,7 @@ namespace KTUSAPS.Data { if (!optionsBuilder.IsConfigured) { - optionsBuilder.UseMySql("Server=localhost;User=samokdev;Password=;Database=samok_dev", new MariaDbServerVersion(new Version(10, 6, 3))); + optionsBuilder.UseMySql("Server=localhost;User=saps;Password=;Database=saps_dev", new MariaDbServerVersion(new Version(10, 6, 3))); } } @@ -31,6 +31,8 @@ namespace KTUSAPS.Data public DbSet PublishedProblems { get; set; } public DbSet Solutions { get; set; } public DbSet Votes { get; set; } + public DbSet Admins { get; set; } + } }