diff --git a/database/migrations/2022_12_14_154533_create_campo_avaliacaos_table.php b/database/migrations/2022_12_14_154533_create_campo_avaliacaos_table.php new file mode 100644 index 0000000000000000000000000000000000000000..8ac2e48d5414276eafea0014246c6c2dbf92c7e0 --- /dev/null +++ b/database/migrations/2022_12_14_154533_create_campo_avaliacaos_table.php @@ -0,0 +1,39 @@ +bigIncrements('id'); + $table->string('nome')->nullable(); + $table->float('nota_maxima')->nullable(); + $table->text('descricao')->nullable(); + $table->integer('prioridade')->nullable(); + + $table->integer('evento_id'); + $table->foreign('evento_id')->references('id')->on('eventos'); + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('campo_avaliacaos'); + } +} diff --git a/database/migrations/2022_12_14_154948_create_avaliacao_trabalhos_table.php b/database/migrations/2022_12_14_154948_create_avaliacao_trabalhos_table.php new file mode 100644 index 0000000000000000000000000000000000000000..0ea0122afea8c908054b990ac4968839b1a61dcd --- /dev/null +++ b/database/migrations/2022_12_14_154948_create_avaliacao_trabalhos_table.php @@ -0,0 +1,42 @@ +bigIncrements('id'); + $table->float('nota')->nullable(); + + $table->integer('avaliador_id'); + $table->foreign('avaliador_id')->references('id')->on('avaliadors'); + + $table->integer('campo_avaliacao_id'); + $table->foreign('campo_avaliacao_id')->references('id')->on('campo_avaliacaos'); + + $table->integer('trabalho_id'); + $table->foreign('trabalho_id')->references('id')->on('trabalhos'); + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('avaliacao_trabalhos'); + } +}