Acho q acabou

This commit is contained in:
GuiNerd
2019-11-30 15:10:33 -03:00
parent cc389221db
commit b98436187f
39 changed files with 924 additions and 1395 deletions

View File

@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace GerenciaProjetos.Migrations
{
[DbContext(typeof(GerenciaContext))]
[Migration("20190924211432_1")]
[Migration("20191130154458_1")]
partial class _1
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -24,14 +24,14 @@ namespace GerenciaProjetos.Migrations
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("CriadorId");
b.Property<DateTime>("DataCadastro");
b.Property<string>("Descricao")
.IsRequired()
.HasMaxLength(100);
b.Property<int>("DesenvolvedorId");
b.Property<bool>("FoiResolvido");
b.Property<string>("Prioridade")
@ -39,12 +39,16 @@ namespace GerenciaProjetos.Migrations
b.Property<int>("RequisitoId");
b.Property<int>("SolucionadorId");
b.HasKey("Id");
b.HasIndex("DesenvolvedorId");
b.HasIndex("CriadorId");
b.HasIndex("RequisitoId");
b.HasIndex("SolucionadorId");
b.ToTable("Bugs");
});
@ -149,15 +153,20 @@ namespace GerenciaProjetos.Migrations
modelBuilder.Entity("GerenciaProjetos.Models.Bug", b =>
{
b.HasOne("GerenciaProjetos.Models.Desenvolvedor", "Desenvolvedor")
b.HasOne("GerenciaProjetos.Models.Desenvolvedor", "Criador")
.WithMany()
.HasForeignKey("DesenvolvedorId")
.HasForeignKey("CriadorId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("GerenciaProjetos.Models.Requisito", "Requisito")
.WithMany()
.WithMany("Bugs")
.HasForeignKey("RequisitoId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("GerenciaProjetos.Models.Desenvolvedor", "Solucionador")
.WithMany()
.HasForeignKey("SolucionadorId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("GerenciaProjetos.Models.DesenvolvedorProjeto", b =>

View File

@ -93,7 +93,8 @@ namespace GerenciaProjetos.Migrations
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
DesenvolvedorId = table.Column<int>(nullable: false),
CriadorId = table.Column<int>(nullable: false),
SolucionadorId = table.Column<int>(nullable: false),
RequisitoId = table.Column<int>(nullable: false),
Descricao = table.Column<string>(maxLength: 100, nullable: false),
Prioridade = table.Column<string>(maxLength: 25, nullable: true),
@ -104,8 +105,8 @@ namespace GerenciaProjetos.Migrations
{
table.PrimaryKey("PK_Bugs", x => x.Id);
table.ForeignKey(
name: "FK_Bugs_Desenvolvedores_DesenvolvedorId",
column: x => x.DesenvolvedorId,
name: "FK_Bugs_Desenvolvedores_CriadorId",
column: x => x.CriadorId,
principalTable: "Desenvolvedores",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
@ -115,6 +116,12 @@ namespace GerenciaProjetos.Migrations
principalTable: "Requisitos",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Bugs_Desenvolvedores_SolucionadorId",
column: x => x.SolucionadorId,
principalTable: "Desenvolvedores",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
@ -143,15 +150,20 @@ namespace GerenciaProjetos.Migrations
});
migrationBuilder.CreateIndex(
name: "IX_Bugs_DesenvolvedorId",
name: "IX_Bugs_CriadorId",
table: "Bugs",
column: "DesenvolvedorId");
column: "CriadorId");
migrationBuilder.CreateIndex(
name: "IX_Bugs_RequisitoId",
table: "Bugs",
column: "RequisitoId");
migrationBuilder.CreateIndex(
name: "IX_Bugs_SolucionadorId",
table: "Bugs",
column: "SolucionadorId");
migrationBuilder.CreateIndex(
name: "IX_DesenvolvedorProjeto_ProjetoId",
table: "DesenvolvedorProjeto",

View File

@ -22,14 +22,14 @@ namespace GerenciaProjetos.Migrations
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("CriadorId");
b.Property<DateTime>("DataCadastro");
b.Property<string>("Descricao")
.IsRequired()
.HasMaxLength(100);
b.Property<int>("DesenvolvedorId");
b.Property<bool>("FoiResolvido");
b.Property<string>("Prioridade")
@ -37,12 +37,16 @@ namespace GerenciaProjetos.Migrations
b.Property<int>("RequisitoId");
b.Property<int>("SolucionadorId");
b.HasKey("Id");
b.HasIndex("DesenvolvedorId");
b.HasIndex("CriadorId");
b.HasIndex("RequisitoId");
b.HasIndex("SolucionadorId");
b.ToTable("Bugs");
});
@ -147,15 +151,20 @@ namespace GerenciaProjetos.Migrations
modelBuilder.Entity("GerenciaProjetos.Models.Bug", b =>
{
b.HasOne("GerenciaProjetos.Models.Desenvolvedor", "Desenvolvedor")
b.HasOne("GerenciaProjetos.Models.Desenvolvedor", "Criador")
.WithMany()
.HasForeignKey("DesenvolvedorId")
.HasForeignKey("CriadorId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("GerenciaProjetos.Models.Requisito", "Requisito")
.WithMany()
.WithMany("Bugs")
.HasForeignKey("RequisitoId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("GerenciaProjetos.Models.Desenvolvedor", "Solucionador")
.WithMany()
.HasForeignKey("SolucionadorId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("GerenciaProjetos.Models.DesenvolvedorProjeto", b =>