Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
8c71f4c5
"app/git@sites.upe.br:walter.felipe/submeta.git" did not exist on "f4c149d998c7887de4e91cc7240eb5d891731941"
Commit
8c71f4c5
authored
May 19, 2022
by
Guilherme Silva
Browse files
Criação da avaliação de relatório
parent
1f45dbcd
Changes
3
Show whitespace changes
Inline
Side-by-side
app/Arquivo.php
View file @
8c71f4c5
...
...
@@ -32,4 +32,8 @@ class Arquivo extends Model
public
function
avaliadors
(){
return
$this
->
belongsToMany
(
'App\Avaliador'
,
'avaliadors_plano_trabalho'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
,
'recomendacao'
,
'created_at'
);
}
public
function
avaliacao_relatorios
(){
return
$this
->
hasMany
(
'App\AvaliacaoRelatorio'
,
'arquivo_id'
);
}
}
app/AvaliacaoRelatorio.php
0 → 100644
View file @
8c71f4c5
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
AvaliacaoRelatorio
extends
Model
{
protected
$fillable
=
[
'tipo'
,
'comentario'
,
'nota'
,
'user_id'
,
'arquivo_id'
];
public
function
plano
(){
return
$this
->
belongsTo
(
Arquivo
::
class
,
'arquivo_id'
,
'id'
);
}
public
function
user
(){
return
$this
->
belongsTo
(
User
::
class
,
'user_id'
,
'id'
);
}
}
database/migrations/2022_05_02_184435_avaliacao_relatorio.php
0 → 100644
View file @
8c71f4c5
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AvaliacaoRelatorio
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'avaliacao_relatorios'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
integer
(
'user_id'
);
$table
->
integer
(
'arquivo_id'
);
$table
->
integer
(
'nota'
)
->
nullable
();
$table
->
text
(
'comentario'
)
->
nullable
();
$table
->
string
(
'arquivoAvaliacao'
)
->
nullable
();
$table
->
enum
(
'tipo'
,
[
'Parcial'
,
'Final'
]);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
$table
->
foreign
(
'arquivo_id'
)
->
references
(
'id'
)
->
on
(
'arquivos'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'avaliacao_relatorios'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment